diff options
author | sternenseemann <sternenseemann@systemli.org> | 2023-02-18 21:56:57 +0100 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2023-02-18 21:56:57 +0100 |
commit | bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8 (patch) | |
tree | 8d0e10676cb162ef43366c328fb261bd5afe9254 /pkgs/build-support | |
parent | 9d78495066a70da40308658f05cedb11c3be1de1 (diff) | |
parent | 6c5bf4e060c359b00ef4f2e194fe000308bc47bf (diff) | |
download | nixpkgs-bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8.tar nixpkgs-bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8.tar.gz nixpkgs-bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8.tar.bz2 nixpkgs-bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8.tar.lz nixpkgs-bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8.tar.xz nixpkgs-bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8.tar.zst nixpkgs-bbe6402ecacfc3a0e2c65e3527c2cbe148b98ff8.zip |
Merge remote-tracking branch 'origin/master' into haskell-updates
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/agda/default.nix | 6 | ||||
-rw-r--r-- | pkgs/build-support/build-graalvm-native-image/default.nix | 32 |
2 files changed, 26 insertions, 12 deletions
diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index 7eeaf73d07c..63adf2a2765 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -20,7 +20,11 @@ let nativeBuildInputs = [ makeWrapper ]; passthru = { unwrapped = Agda; - tests = { inherit (nixosTests) agda; }; + inherit withPackages; + tests = { + inherit (nixosTests) agda; + allPackages = withPackages (lib.filter self.lib.isUnbrokenAgdaPackage (lib.attrValues self)); + }; }; inherit (Agda) meta; } '' diff --git a/pkgs/build-support/build-graalvm-native-image/default.nix b/pkgs/build-support/build-graalvm-native-image/default.nix index 810ef52235e..3bf675b5d20 100644 --- a/pkgs/build-support/build-graalvm-native-image/default.nix +++ b/pkgs/build-support/build-graalvm-native-image/default.nix @@ -1,7 +1,9 @@ -{ lib, stdenv, graalvm-ce, glibcLocales }: - -{ name ? "${args.pname}-${args.version}" - # Final executable name +{ lib +, stdenv +, glibcLocales + # The GraalVM derivation to use +, graalvmDrv +, name ? "${args.pname}-${args.version}" , executable ? args.pname # JAR used as input for GraalVM derivation, defaults to src , jar ? args.src @@ -9,7 +11,6 @@ # Default native-image arguments. You probably don't want to set this, # except in special cases. In most cases, use extraNativeBuildArgs instead , nativeImageBuildArgs ? [ - "-jar" jar (lib.optionalString stdenv.isDarwin "-H:-CheckToolchain") "-H:Name=${executable}" "--verbose" @@ -18,16 +19,25 @@ , extraNativeImageBuildArgs ? [ ] # XMX size of GraalVM during build , graalvmXmx ? "-J-Xmx6g" - # The GraalVM derivation to use -, graalvmDrv ? graalvm-ce # Locale to be used by GraalVM compiler , LC_ALL ? "en_US.UTF-8" , meta ? { } , ... } @ args: -stdenv.mkDerivation (args // { - inherit dontUnpack LC_ALL; +let + extraArgs = builtins.removeAttrs args [ + "lib" + "stdenv" + "glibcLocales" + "jar" + "dontUnpack" + "LC_ALL" + "meta" + ]; +in +stdenv.mkDerivation ({ + inherit dontUnpack LC_ALL jar; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ graalvmDrv glibcLocales ]; @@ -36,7 +46,7 @@ stdenv.mkDerivation (args // { buildPhase = args.buildPhase or '' runHook preBuild - native-image ''${nativeImageBuildArgs[@]} + native-image -jar "$jar" ''${nativeImageBuildArgs[@]} runHook postBuild ''; @@ -61,4 +71,4 @@ stdenv.mkDerivation (args // { # need to have native-image-installable-svm available broken = !(builtins.any (p: (p.product or "") == "native-image-installable-svm") graalvmDrv.products); } // meta; -}) +} // extraArgs) |