{ stdenv, bundlerEnv, ruby_2_7, callPackage , pname ? "diaspora" , version ? import ./version.nix }: stdenv.mkDerivation rec { inherit pname version; diasporaGems = bundlerEnv { name = "${pname}-gems-${version}"; version = version; ruby = ruby_2_7; gemdir = callPackage ./source.nix {}; gemset = ./gemset.nix; }; name = "diaspora"; src = ./.; buildInputs = [diasporaGems ruby]; installPhase = '' mkdir -p $out/{bin,share/diaspora} cp -r * $out/share/diaspora bin=$out/bin/diaspora # we are using bundle exec to start in the bundled environment cat > $bin <