diaspora-nixpkgs/default.nix

35 lines
665 B
Nix
Raw Normal View History

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