Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake.lock: Update #161

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cross-windows.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ let tool-version-map = import ./tool-map.nix;
cabal-install = pkgs.pkgsBuildBuild.haskell-nix.nix-tools-unchecked.exes.cabal;
# add a trace helper. This will trace a message about disabling a component despite requesting it, if it's not supported in that compiler.
compiler-not-in = compiler-list: name: (if __elem compiler-nix-name compiler-list then __trace "No ${name}. Not yet compatible with ${compiler-nix-name}" false else true);

# Exclude zstd support for now, since it's currently broken on mingw32W64:
# https://github.com/NixOS/nixpkgs/issues/333338
curl = pkgs.curl.override ({
zstdSupport = false;
pslSupport = false;
});
inherit (pkgs.haskell-nix.iserv-proxy-exes.${compiler-nix-name}) iserv-proxy iserv-proxy-interpreter;

dllPkgs = [
Expand Down Expand Up @@ -56,7 +61,7 @@ let tool-version-map = import ./tool-map.nix;
# A cabal-install wrapper that sets the appropriate static flags
wrapped-cabal = pkgs.pkgsBuildBuild.writeShellApplication {
name = "cabal";
runtimeInputs = [ cabal-install pkgs.curl ];
runtimeInputs = [ cabal-install curl ];
text = ''
# We do not want to quote NIX_CABAL_FLAGS
# it will leave an empty argument, if they are empty.
Expand Down
124 changes: 60 additions & 64 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 29 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@
cbor-diag = final.callPackage ./pkgs/cbor-diag { };
cddl = final.callPackage ./pkgs/cddl { };
});

musl = (final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl {
# Fix the following Ruby cross build error:
#
# error: output '/nix/store/6hyyk9wnnxpd5rsr6ivc0s8l1lgvsjrb-ruby-x86_64-unknown-linux-musl-3.3.4'
# is not allowed to refer to the following paths:
# /nix/store/c77wdd4fb0llq37bpmfr73m7s7r1j068-ruby-3.3.4
#
# See https://github.com/NixOS/nixpkgs/issues/347758
ruby = prev.ruby.overrideAttrs (old: {
postInstall = old.postInstall + ''
find $out/${old.passthru.gemPath} -name exts.mk -delete
'';
});

# Tests on static postgresql are failing with:
#
# FATAL: could not load library "/build/postgresql-16.4/.../lib/dict_snowball.so":
# Error relocating /build/postgresql-16.4/tmp_install/nix/store/.../lib/dict_snowball.so:
# pg_any_to_server: symbol not found
postgresql = prev.postgresql.overrideAttrs (_: {
doCheck = false;
});
});
};
supportedSystems = [
"x86_64-linux"
Expand Down Expand Up @@ -187,12 +211,15 @@
} "touch $out";
} // (pkgs.lib.mapAttrs' (name: drv:
pkgs.lib.nameValuePair "${name}-env" (
# We need to use unsafeDiscardOutputDependency here, as it will otherwise
# pull in a bunch of dependenceis we don't care about at all from the .drvPath
# query.
let env = pkgs.runCommand "${name}-env.sh" {
requiredSystemFeatures = [ "recursive-nix" ];
nativeBuildInputs = [ pkgs.nix ];
} ''
nix --offline --extra-experimental-features "nix-command flakes" \
print-dev-env ${drv.drvPath} >> $out
print-dev-env '${builtins.unsafeDiscardOutputDependency drv.drvPath}^*' >> $out
'';
# this needs to be linux. It would be great if we could have this
# eval platform agnostic, but flakes don't permit this. A the
Expand Down Expand Up @@ -221,7 +248,7 @@
license = pkgs.lib.licenses.asl20;
platforms = pkgs.lib.platforms.unix;
};
})) devShellsWithEvalOnLinux) // {
})) devShells) // {
};
packages.cabalProjectLocal.static = (import ./quirks.nix { pkgs = static-pkgs; static = true; }).template;
packages.cabalProjectLocal.cross-js = (import ./quirks.nix { pkgs = js-pkgs; }).template;
Expand Down
10 changes: 1 addition & 9 deletions tool-map.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,11 @@ compiler-nix-name: tool: {
# Use the github source of HLS that is tested with haskell.nix CI
src = { "ghc8107" = pkgs.haskell-nix.sources."hls-2.2";
"ghc902" = pkgs.haskell-nix.sources."hls-2.4";
}.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.6";
}.${compiler-nix-name} or pkgs.haskell-nix.sources."hls-2.9";
# `tool` normally ignores the `cabal.project` (if there is one in the hackage source).
# We need to use the github one (since it has settings to make hls build).
cabalProject = __readFile (src + "/cabal.project");
configureArgs = "--disable-benchmarks --disable-tests";
modules = [{
packages.ghcide.patches =
(if compiler-nix-name != "ghc8107" && compiler-nix-name != "ghc902" then [
# The following patch only works with hls-2.6 ...
# https://github.com/haskell/haskell-language-server/issues/4046#issuecomment-1926242056
./extra/ghcide-workaround.diff
] else []);
}];
};
happy = { version = "1.20.1.1"; inherit cabalProjectLocal; };
alex = { version = "3.2.7.3"; inherit cabalProjectLocal; };
Expand Down
Loading