switch to develop

This commit is contained in:
Bit Borealis 2023-07-23 04:51:37 +00:00
parent 01daabc3d2
commit 9509bb962c
5 changed files with 588 additions and 766 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, bundlerEnv, ruby_2_7, callPackage { stdenv, bundlerEnv, ruby, callPackage, perl, defaultGemConfig
, pname ? "diaspora" , pname ? "diaspora"
, version ? import ./version.nix , version ? import ./version.nix
@ -7,26 +7,28 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
inherit pname version; inherit pname version;
src = callPackage ./source.nix {};
diasporaGems = bundlerEnv { diasporaGems = bundlerEnv {
name = "${pname}-gems-${version}"; name = "${pname}-gems-${version}";
version = version; version = version;
ruby = ruby_2_7; ruby = ruby;
gemdir = callPackage ./source.nix {}; gemconfig = defaultGemConfig // {
kostya-sigar = attrs: {
buildInputs = [ perl ];
};
};
gemdir = src;
gemset = ./gemset.nix; gemset = ./gemset.nix;
}; };
name = "diaspora"; name = "diaspora";
src = ./.;
buildInputs = [diasporaGems ruby]; buildInputs = [diasporaGems ruby];
installPhase = '' installPhase = ''
mkdir -p $out/{bin,share/diaspora} mkdir -p $out/{bin,share/diaspora}
cp -r * $out/share/diaspora cp -r * $out/share/diaspora
bin=$out/bin/diaspora bin=$out/bin/diaspora
# we are using bundle exec to start in the bundled environment
cat > $bin <<EOF
#!/bin/sh -e
exec ${diasporaGems}/bin/bundle exec ${ruby}/bin/ruby $out/share/diaspora/diaspora "\$@"
EOF
chmod +x $bin chmod +x $bin
''; '';
} }

1316
gemset.nix

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@ with import <nixpkgs> {};
stdenv.mkDerivation { stdenv.mkDerivation {
name = "env"; name = "env";
buildInputs = [ buildInputs = [
ruby_2_7.devEnv ruby.devEnv
git git
patch patch
imagemagick imagemagick

View file

@ -3,8 +3,8 @@
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "diaspora"; owner = "diaspora";
repo = "diaspora"; repo = "diaspora";
rev = "v0.7.18.2"; rev = "744f5449fb7bfd1ac2bfd50d2e157d97c77a3bca";
sha256 = "1fla7wlwnsv5gqnjfiigxrjgkka6msjkk1pw493c4d5l3dqh5hkm"; sha256 = "193sv84489bq9s98lqqgpc0p32jy8qpzmii1y1lv4fgf7v121f70";
}; };
in applyPatches { in applyPatches {
inherit src; inherit src;

View file

@ -1 +1 @@
"v0.7.18.2" "unstable-2023-07-09"