diaspora-nixpkgs/default.nix
2023-07-31 01:19:48 +00:00

41 lines
678 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 {
inherit version ruby;
name = "${pname}-gems-${version}";
gemconfig = defaultGemConfig // {
kostya-sigar = attrs: {
buildInputs = [ perl ];
};
};
gemdir = src;
gemset = ./gemset.nix;
};
name = "diaspora";
buildInputs = [ diasporaGems ruby ];
nativeBuildInputs = [ diasporaGems ];
installPhase = ''
mkdir -p $out/{bin,share/diaspora}
cp -r * $out/share/diaspora
bin=$out/bin/diaspora
chmod +x $bin
'';
}