Revert "Use different nixpkgs for each compiler-nix-name"

This reverts commit 0865877d33.
This commit is contained in:
Sebastian Estrella 2024-07-05 12:14:02 -05:00
parent 0865877d33
commit 78f2be1668
3 changed files with 41 additions and 53 deletions

View File

@ -19,14 +19,14 @@ jobs:
matrix:
os:
# - macos-13 # x86_64-darwin
# - macos-latest # aarch64-darwin
- macos-latest # aarch64-darwin
- ubuntu-latest # x86_64-linux
installable:
- test-ghc8107
- test-ghc902
# exclude:
# - os: ubuntu-latest
# installable: test-ghc902
exclude:
- os: ubuntu-latest
installable: test-ghc902
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:

View File

@ -175,11 +175,11 @@
"hackage": {
"flake": false,
"locked": {
"lastModified": 1718584755,
"narHash": "sha256-pJlQrQis0mZjgyVsgJ1t18UaiNYad0n6NTba3jz9Sz8=",
"lastModified": 1719016632,
"narHash": "sha256-SVZYZg2/9LasyfijTiY/dgr3g7v3BRRx0yyxtDnsLE8=",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "c49948dd8b4a940dd065e515bc9f6c8fad887118",
"rev": "7a26dca8c822a23a4e5a725ccd56da11b0dd74de",
"type": "github"
},
"original": {
@ -228,16 +228,15 @@
"stackage": "stackage"
},
"locked": {
"lastModified": 1718623538,
"narHash": "sha256-eCcwsAk+psje0bUS3TWmT3oVJqytqPRf1E3jPLZk4Is=",
"lastModified": 1719017430,
"narHash": "sha256-n/ctlEhmzGcco5hXM+OWimkr1XqKyjHXt9wSv88HyqI=",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "b487c93a357175b8630809f03104744f3f6142b6",
"rev": "f65f0349733b0c18139a960bf1ce95d18589c917",
"type": "github"
},
"original": {
"owner": "input-output-hk",
"ref": "nix-tools-0.2.2",
"repo": "haskell.nix",
"type": "github"
}
@ -669,11 +668,7 @@
"inputs": {
"flake-utils": "flake-utils",
"haskellNix": "haskellNix",
"nixpkgs-2205": [
"haskellNix",
"nixpkgs-2205"
],
"nixpkgs-unstable": [
"nixpkgs": [
"haskellNix",
"nixpkgs-unstable"
]
@ -682,11 +677,11 @@
"stackage": {
"flake": false,
"locked": {
"lastModified": 1718583890,
"narHash": "sha256-vn+rzgyletX8g/Y3KLTH3QUwGsEnFqU6EsxMivuJML4=",
"lastModified": 1719015795,
"narHash": "sha256-wJyFaY7m75xH3CIHPxJ25H+nE7BdtDOxF6JLyAaSvWk=",
"owner": "input-output-hk",
"repo": "stackage.nix",
"rev": "ba6965d6a5806c4bf58271c9670959456a46e32e",
"rev": "56a010491be669780a5edf06445bd3f81e05b165",
"type": "github"
},
"original": {

View File

@ -1,59 +1,52 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
haskellNix.url = "github:input-output-hk/haskell.nix/nix-tools-0.2.2";
nixpkgs-2205.follows = "haskellNix/nixpkgs-2205";
nixpkgs-unstable.follows = "haskellNix/nixpkgs-unstable";
haskellNix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
};
nixConfig = {
allow-import-from-derivation = "true";
allow-import-from-derivation = true;
extra-substituters = [ "https://cache.iog.io" ];
extra-trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
};
outputs = inputs@{ self, flake-utils, haskellNix, nixpkgs-2205, nixpkgs-unstable }:
outputs = inputs@{ self, flake-utils, haskellNix, nixpkgs }:
# https://input-output-hk.github.io/haskell.nix/tutorials/getting-started-flakes.html
flake-utils.lib.eachDefaultSystem (system:
let
mkCabalProject = final: compiler-nix-name: final.haskell-nix.cabalProject' {
inherit compiler-nix-name;
src = final.haskell-nix.haskellLib.cleanGit {
name = "hapistrano";
src = ./.;
};
};
pkgs-2205 = import nixpkgs-2205 {
pkgs = import nixpkgs {
inherit system;
inherit (haskellNix) config;
overlays = [
haskellNix.overlay
(final: prev: {
hapistrano = mkCabalProject final "ghc8107";
})
(final: prev:
let
mkCabalProject = compiler-nix-name: final.haskell-nix.cabalProject' {
inherit compiler-nix-name;
src = final.haskell-nix.haskellLib.cleanGit {
name = "hapistrano";
src = ./.;
};
};
in
{
hapistrano-ghc8107 = mkCabalProject "ghc8107";
hapistrano-ghc902 = mkCabalProject "ghc902";
})
];
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
inherit (haskellNix) config;
overlays = [
haskellNix.overlay
(final: prev: {
hapistrano = mkCabalProject final "ghc902";
})
];
};
flake-ghc8107 = pkgs-2205.hapistrano.flake { };
flake-ghc902 = pkgs-unstable.hapistrano.flake { };
flake-ghc8107 = pkgs.hapistrano-ghc8107.flake { };
flake-ghc902 = pkgs.hapistrano-ghc902.flake { };
overrideTestPackage = flake: flake.packages."hapistrano:test:test".overrideAttrs (_: {
postFixup = ''
wrapProgram $out/bin/test \
--set PATH ${pkgs-unstable.lib.makeBinPath [
pkgs-unstable.bash
pkgs-unstable.coreutils
pkgs-unstable.findutils
pkgs-unstable.git
pkgs-unstable.zsh
--set PATH ${pkgs.lib.makeBinPath [
pkgs.bash
pkgs.coreutils
pkgs.findutils
pkgs.git
pkgs.zsh
]}
'';
});