Skip to content

Revamp nix flake for nix-tools #2010

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

Merged
merged 42 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5ff69b8
Rework static-nix-tool
andreabedini Jul 28, 2023
be4476e
Remove buildkite configuration
andreabedini Aug 1, 2023
15d19ef
Use exeName for packages
andreabedini Aug 1, 2023
01d3e46
Move nix-tools to its own overlay
andreabedini Aug 1, 2023
6d69a9f
Remove nix-prefetch-git from nix-tools closure
andreabedini Aug 1, 2023
f7c5ad2
Merge branch 'static-nix-tools-haskell.nix' into static-nix-tools
andreabedini Aug 1, 2023
e441cc7
Uhm....
andreabedini Aug 1, 2023
dae398d
Make clear that nix-tools are compiled with a single GHC
andreabedini Aug 1, 2023
de39c2d
Fix error if attribute is missing
andreabedini Aug 2, 2023
bb663e8
Restore testing truncate-index
andreabedini Aug 2, 2023
5ff7f2f
Add some tests
andreabedini Aug 2, 2023
4280ab4
Add missing --accept-flake-config
andreabedini Aug 2, 2023
95bc0dc
Update materialisations
andreabedini Aug 2, 2023
fb58d65
Reword warning
andreabedini Aug 2, 2023
951aaef
Fix tests
andreabedini Aug 4, 2023
779cb19
Merge remote-tracking branch 'upstream/master' into static-nix-tools
andreabedini Aug 8, 2023
20daf62
WIP
andreabedini Aug 8, 2023
a06585a
WIP: move everything nix-tools related to the subflake
andreabedini Aug 9, 2023
7474a70
Better name
andreabedini Aug 15, 2023
c14d472
Remove unused binding
andreabedini Aug 15, 2023
c9467d0
Strip compiler name from nix-tools, there's only one
andreabedini Aug 15, 2023
8ad85a6
Almost fix importing nix-tools overlay
andreabedini Aug 15, 2023
8b049cd
Actually fix importing nix-tools's overlay
andreabedini Aug 15, 2023
1655874
Only one nix-tools-unchecked
andreabedini Aug 15, 2023
98a043d
Make sure exes and project are also exposed by nix-tools.${compiler-n…
andreabedini Aug 15, 2023
3de4e1f
Temporarily restore internal-nix-tools
andreabedini Aug 15, 2023
c48273d
Fix truncate-index test
andreabedini Aug 15, 2023
f79bae4
Temporarily disable static tarballs
andreabedini Aug 17, 2023
3218ba3
Move nix-tools back to ghc 8.10.7
andreabedini Aug 17, 2023
d4413c7
Update materialized plan after changing the compiler
andreabedini Aug 17, 2023
1a68c19
ifdLevel 0
andreabedini Aug 17, 2023
3108294
ifdLevel 1
hamishmack Aug 17, 2023
afda756
ifdLevel 2
andreabedini Aug 17, 2023
df49622
Use the same index-state as haskell.nix internal one
andreabedini Aug 17, 2023
4cf8ac9
ifdLevel 0
andreabedini Aug 17, 2023
8163104
ifdLevel 1
andreabedini Aug 17, 2023
9510005
Try index-state 2023-07-03T00:00:00Z
andreabedini Aug 17, 2023
8d3ac93
And update the materialisation
andreabedini Aug 17, 2023
009dfd1
Only check materialization `nix-tools` when told to
hamishmack Aug 17, 2023
9fe2e75
ifdLevel 2
hamishmack Aug 17, 2023
09429ee
ifdLevel 3
hamishmack Aug 17, 2023
3b5158f
Merge branch 'master' into static-nix-tools
hamishmack Aug 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ jobs:
- name: "Check hix -- run github:haskell/cabal/3.10#cabal-install:exe:cabal -- --version"
run: "HIX_DIR=$(mktemp -d) nix run .#hix --accept-flake-config -- run github:haskell/cabal/3.10#cabal-install:exe:cabal --accept-flake-config --override-input haskellNix . -- --version"

nix-tools-build:
nix-tools:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
- name: "nix-tools build"
run: cd ./nix-tools && .buildkite/nix-tools-build.sh
- run: nix build ./nix-tools#checks.x86_64-linux.truncate-index --accept-flake-config
2 changes: 1 addition & 1 deletion build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ in rec {
check-closure-size = pkgs.buildPackages.callPackage ./scripts/check-closure-size.nix {
# Includes cabal-install since this is commonly used.
nix-tools = pkgs.linkFarm "common-tools" [
{ name = "nix-tools"; path = haskell.nix-tools.${compiler-nix-name}; }
{ name = "nix-tools"; path = haskell.nix-tools; }
{ name = "cabal-install"; path = haskell.cabal-install.${compiler-nix-name}; }
];
};
Expand Down
8 changes: 3 additions & 5 deletions lib/call-cabal-project-to-nix.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, runCommand, cacert, index-state-hashes, haskellLib }@defaults:
{ pkgs, runCommand, cacert, index-state-hashes, haskellLib }:
{ name ? src.name or null # optional name for better error messages
, src
, materialized-dir ? ../materialized
Expand Down Expand Up @@ -66,13 +66,13 @@
let
inherit (evalPackages.haskell-nix) materialize dotCabal;

# These defaults are hear rather than in modules/cabal-project.nix to make them
# These defaults are here rather than in modules/cabal-project.nix to make them
# lazy enough to avoid infinite recursion issues.
# Using null as the default also improves performance as they are not forced by the
# nix module system for `nix-tools-unchecked` and `cabal-install-unchecked`.
nix-tools = if args.nix-tools or null != null
then args.nix-tools
else evalPackages.haskell-nix.nix-tools-unchecked.${compiler-nix-name};
else evalPackages.haskell-nix.nix-tools-unchecked;
cabal-install = if args.cabal-install or null != null
then args.cabal-install
else evalPackages.haskell-nix.cabal-install-unchecked.${compiler-nix-name};
Expand Down Expand Up @@ -148,8 +148,6 @@ in let
then index-state
else pkgs.lib.last (builtins.attrNames index-state-hashes);

pkgconfPkgs = import ./pkgconf-nixpkgs-map.nix pkgs;

# If a hash was not specified find a suitable cached index state to
# use that will contain all the packages we need. By using the
# first one after the desired index-state we can avoid recalculating
Expand Down
110 changes: 0 additions & 110 deletions materialized/ghc902/nix-tools/.plan.nix/hackage-db.nix

This file was deleted.

Loading