41 lines
678 B
Nix
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
|
|
'';
|
|
}
|