diaspora-nixpkgs/default.nix
2023-07-23 04:51:37 +00:00

35 lines
665 B
Nix

{ stdenv, bundlerEnv, ruby, callPackage, perl, defaultGemConfig
, pname ? "diaspora"
, version ? import ./version.nix
}:
stdenv.mkDerivation rec {
inherit pname version;
src = callPackage ./source.nix {};
diasporaGems = bundlerEnv {
name = "${pname}-gems-${version}";
version = version;
ruby = ruby;
gemconfig = defaultGemConfig // {
kostya-sigar = attrs: {
buildInputs = [ perl ];
};
};
gemdir = src;
gemset = ./gemset.nix;
};
name = "diaspora";
buildInputs = [diasporaGems ruby];
installPhase = ''
mkdir -p $out/{bin,share/diaspora}
cp -r * $out/share/diaspora
bin=$out/bin/diaspora
chmod +x $bin
'';
}