From 8908beaf744c2e4ac7eda1f2c182b931575faa09 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 9 Feb 2026 22:36:21 +0100 Subject: [PATCH 1/2] buildCrystalPackage: move env variable(s) into env for structuredAttrs --- pkgs/development/compilers/crystal/build-package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/crystal/build-package.nix b/pkgs/development/compilers/crystal/build-package.nix index 7914b7d7771e..f4044b6a7781 100644 --- a/pkgs/development/compilers/crystal/build-package.nix +++ b/pkgs/development/compilers/crystal/build-package.nix @@ -108,9 +108,11 @@ stdenv.mkDerivation ( ++ [ "runHook postConfigure" ] )); - CRFLAGS = lib.concatStringsSep " " defaultOptions; + env = { + CRFLAGS = lib.concatStringsSep " " defaultOptions; - PREFIX = placeholder "out"; + PREFIX = placeholder "out"; + }; inherit enableParallelBuilding; strictDeps = true; From 0cc8de0e67c9d08518960b8cc2033361b97ad8a0 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 9 Feb 2026 22:36:47 +0100 Subject: [PATCH 2/2] crystal: move env variable(s) into env for structuredAttrs --- pkgs/development/compilers/crystal/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 5c24c6649580..a94eeb9ba20d 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -199,15 +199,17 @@ let "progress=1" ]; - LLVM_CONFIG = "${llvmPackages.llvm.dev}/bin/llvm-config"; + env = { + LLVM_CONFIG = "${llvmPackages.llvm.dev}/bin/llvm-config"; - FLAGS = [ - "--single-module" # needed for deterministic builds - ]; + FLAGS = [ + "--single-module" # needed for deterministic builds + ]; - # This makes sure we don't keep depending on the previous version of - # crystal used to build this one. - CRYSTAL_LIBRARY_PATH = "${placeholder "lib"}/crystal"; + # This makes sure we don't keep depending on the previous version of + # crystal used to build this one. + CRYSTAL_LIBRARY_PATH = "${placeholder "lib"}/crystal"; + }; # We *have* to add `which` to the PATH or crystal is unable to build # stuff later if which is not available.