Skip to content

Update add for-stackage hackage.nix input #2315

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 3 commits into from
Feb 5, 2025
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
1 change: 1 addition & 0 deletions .github/workflows/updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- name: "Update pins"
run: |
nix flake update hackage
nix flake update hackage-for-stackage
nix flake update stackage
- name: Commit and push changes
run: |
Expand Down
7 changes: 1 addition & 6 deletions build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
, nixpkgsArgs ? haskellNix.nixpkgsArgs
, pkgs ? import nixpkgs nixpkgsArgs
, evalPackages ? import nixpkgs nixpkgsArgs
# This version is used to make our GitHub Action runners happy
# Using `nixpkgs-unstable` currently results in:
# version `GLIBCXX_3.4.30' not found
, nixpkgsForGitHubAction ? haskellNix.sources.nixpkgs-2211
, pkgsForGitHubAction ? import nixpkgsForGitHubAction (nixpkgsArgs // { inherit (pkgs) system; })
, ifdLevel ? 1000
, compiler-nix-name ? throw "No `compiler-nix-name` passed to build.nix"
, haskellNix ? (import ./default.nix {})
Expand Down Expand Up @@ -98,7 +93,7 @@ in rec {
nix-tools = haskell.nix-tools-unchecked; # includes cabal-install and default-setup
};
check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};
check-path-support = pkgsForGitHubAction.buildPackages.callPackage ./scripts/check-path-support.nix {
check-path-support = pkgs.buildPackages.callPackage ./scripts/check-path-support.nix {
inherit compiler-nix-name;
};
};
Expand Down
109 changes: 21 additions & 88 deletions flake.lock

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

9 changes: 4 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

inputs = {
nixpkgs.follows = "nixpkgs-unstable";
nixpkgs-2003 = { url = "github:NixOS/nixpkgs/nixpkgs-20.03-darwin"; };
nixpkgs-2105 = { url = "github:NixOS/nixpkgs/nixpkgs-21.05-darwin"; };
nixpkgs-2111 = { url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin"; };
nixpkgs-2205 = { url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin"; };
nixpkgs-2211 = { url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin"; };
nixpkgs-2305 = { url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; };
nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; };
nixpkgs-2405 = { url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; };
Expand All @@ -28,6 +23,10 @@
url = "github:input-output-hk/hackage.nix";
flake = false;
};
hackage-for-stackage = {
url = "github:input-output-hk/hackage.nix/for-stackage";
flake = false;
};
stackage = {
url = "github:input-output-hk/stackage.nix";
flake = false;
Expand Down
10 changes: 0 additions & 10 deletions hackage-src.json

This file was deleted.

7 changes: 1 addition & 6 deletions overlays/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ final: prev: {
# here and be explicit about imports and dependencies.
callPackage = prev.lib.callPackageWith (final // final.haskell-nix);

# You can provide different pins for hackage.nix and stackage.nix if required.
# It's also possible to override these sources with NIX_PATH.
hackageSourceJSON = ../hackage-src.json;
stackageSourceJSON = ../stackage-src.json;

# ghc hackage patches.
# these are patches that turn hackage packages into the same as the ones
# ghc ships with the supposedly same version. See GHC Track Issue: 16199
Expand All @@ -47,7 +42,7 @@ final: prev: {
# All packages from Hackage as Nix expressions
hackageSrc = sources.hackage;
# The only stack projects need hackage.nix now
hackageForStack = import hackageSrc;
hackageForStack = import sources.hackage-for-stackage;

# Contains the hashes of the cabal 01-index.tar.gz for given
# index states. Starting from April 1st 2019.
Expand Down
10 changes: 0 additions & 10 deletions stackage-src.json

This file was deleted.

4 changes: 2 additions & 2 deletions test/stack-remote-resolver/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
let
project = project' {
src = testSrc "stack-remote-resolver";
resolverSha256 = "1rldkqqsxd8zxybrkqhc25bcxinhz212kz45jcz8jinfihc91jl7";
resolverSha256 = "sha256-Vw1i0woTpbnbfl7KLAWZW6tfMHV7MOGLtzSlacM5sLE=";
inherit evalPackages;
};
packages = project.hsPkgs;

in recurseIntoAttrs {
meta.disabled = compiler-nix-name != "ghc865";
meta.disabled = compiler-nix-name != "ghc984";
ifdInputs = {
inherit (project) stack-nix;
};
Expand Down
2 changes: 1 addition & 1 deletion test/tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -I "nixpkgs=channel:nixos-22.11" -i bash -p bash jq nix gnused
#! nix-shell -I "nixpkgs=channel:nixos-24.11" -i bash -p bash jq nix gnused

set -euo pipefail

Expand Down