Skip to content

Commit

Permalink
Merge pull request #7 from loophp/refactor/fix-srcs
Browse files Browse the repository at this point in the history
fix: developmentVersions srcs
  • Loading branch information
drupol authored Sep 18, 2023
2 parents 0b74561 + 4dc4e36 commit b0842e0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
(builtins.listToAttrs (builtins.concatMap (x: builtins.map (x: { name = x.version; value = builtins.elemAt x.source 1; }) (builtins.attrValues x)) (builtins.attrValues (builtins.fromJSON (builtins.readFile inputs.php-active)))));

developmentVersions = {
php-8-1-snapshot = { version = "8.1.999.${inputs.php-src-81.shortRev}"; src = inputs.php-src-master; };
php-8-2-snapshot = { version = "8.2.999.${inputs.php-src-82.shortRev}"; src = inputs.php-src-master; };
php-8-3-snapshot = { version = "8.3.999.${inputs.php-src-83.shortRev}"; src = inputs.php-src-master; };
php-8-1-snapshot = { version = "8.1.999.${inputs.php-src-81.shortRev}"; src = inputs.php-src-81; };
php-8-2-snapshot = { version = "8.2.999.${inputs.php-src-82.shortRev}"; src = inputs.php-src-82; };
php-8-3-snapshot = { version = "8.3.999.${inputs.php-src-83.shortRev}"; src = inputs.php-src-83; };
php-master-snapshot = { version = "8.4.999.${inputs.php-src-master.shortRev}"; src = inputs.php-src-master; };
};

Expand Down Expand Up @@ -230,7 +230,7 @@
});

tokenizer = prev.extensions.tokenizer.overrideAttrs (attrs: {
patches = if lib.versionOlder prev.php.version "8.1" then [ ] else attrs.patches;
patches = [ ] ++ lib.optionals (lib.versionAtLeast prev.php.version "8.1") attrs.patches;
});
};
};
Expand All @@ -243,16 +243,19 @@
in
{
"${name}" = {
version = set.version;
src = pkgs.fetchurl { url = "https://www.php.net/distributions/php-${set.version}.tar.bz2"; hash = set.hash; };
inherit (set) version;
src = pkgs.fetchurl {
inherit (set) hash;
url = "https://www.php.net/distributions/php-${set.version}.tar.bz2";
};
};
}
))
{ }
versions;
in
lib.mapAttrs
(k: v: (makePhpPackage { version = v.version; src = v.src; }).withExtensions ({ all, ... }: with all; [
(k: v: (makePhpPackage v).withExtensions ({ all, ... }: with all; [
bcmath
calendar
curl
Expand Down

0 comments on commit b0842e0

Please sign in to comment.