diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c595f4b..c61bf88 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,6 @@ jobs: "nixos-unstable", "nixos-24.05", "nixos-24.11", - "ce40ce79f14469fd17dfe41c9b51490495d3f99e", empty] as $nixpkgss | [ diff --git a/default.nix b/default.nix index 1aa23fb..2e8c4bd 100644 --- a/default.nix +++ b/default.nix @@ -130,15 +130,25 @@ in { }); fpc = let - needsFix = pkgs.hostPlatform.isDarwin && !(pkgs.lib.hasInfix "-syslibroot $SDKROOT" (pkgs.fpc.preConfigure or "")); - in pkgs.fpc.overrideAttrs (old: { - preConfigure = pkgs.lib.optionalString needsFix '' - NIX_LDFLAGS="-syslibroot $SDKROOT -L${pkgs.lib.getLib pkgs.libiconv}/lib" - '' + (old.preConfigure or ""); - meta = old.meta // { - description = "${old.meta.description or "fpc"} (fixed for macOS/Darwin)"; + inherit (pkgs) fpc lib; + needsFix = + pkgs.hostPlatform.isDarwin && + !(lib.hasInfix "-syslibroot $SDKROOT" (fpc.preConfigure or "")) + ; + nixpkgs-fpc-fix = pkgs.fetchFromGitHub { + name = "nixpkgs-fpc-fix"; + owner = "NixOS"; + repo = "nixpkgs"; + rev = "ce40ce79f14469fd17dfe41c9b51490495d3f99e"; + sparseCheckout = [ + "pkgs/development/compilers/fpc" + ]; + nonConeMode = true; + hash = "sha256-fumRYQgvlsLLT48JPNbmP5VZD3D4C6XTfSKxiCDKIno="; }; - }); + in lib.addMetaAttrs ({ + description = "${fpc.meta.description or "fpc"} (fixed for macOS/Darwin)"; + }) (if needsFix then pkgs.callPackage "${nixpkgs-fpc-fix}/pkgs/development/compilers/fpc/" {} else fpc); drl-packages = callPackage ./pkgs/drl/packages.nix {}; inherit (self.drl-packages) drl drl-hq drl-lq;