on iko/ghcjs-patch-master help sign in
Drop 19.09 support (#947)
20b6629Michael Peyton Jones
@@ -9,7 +9,6 @@
9 inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
9 inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
10 sources = import ./nix/sources.nix {};
10 sources = import ./nix/sources.nix {};
11 nixpkgsVersions = {
11 nixpkgsVersions = {
12− "R1909" = "nixpkgs-1909";
13 "R2003" = "nixpkgs-2003";
12 "R2003" = "nixpkgs-2003";
14 "R2009" = "nixpkgs-2009";
13 "R2009" = "nixpkgs-2009";
15 };
14 };
docs/dev/nixpkgs-pin.md+7−15
@@ -1,25 +1,17 @@
1# Haskell.nix Nixpkgs Pin
1# Haskell.nix Nixpkgs Pin
2
2
3−Haskell.nix contains a Nixpkgs pin in
3+Haskell.nix contains several Nixpkgs pins imanaged by `niv` in
4−[`nixpkgs/github.json`](https://github.com/input-output-hk/haskell.nix/blob/master/nixpkgs/github.json).
4+`nix/sources.json`.
5−This is the version of Nixpkgs used for builds of `nix-tools` and
5+
6−running the tests.
6+These are used in testing various versions of nixpkgs.
7
7
8To use haskell.nix the `config` and `overlays` need to be applied to
8To use haskell.nix the `config` and `overlays` need to be applied to
9Nixpkgs. Users should probably pin a suitable version of nixpkgs, although things might not work for them if their Nixpkgs version is
9Nixpkgs. Users should probably pin a suitable version of nixpkgs, although things might not work for them if their Nixpkgs version is
10too different.
10too different.
11
11
12We aim to keep this pin somewhere on a channel of the **Nixpkgs latest
12We aim to keep this pin somewhere on a channel of the **Nixpkgs latest
13−stable release**. That is currently 19.09.
13+stable release**. That is currently 20.09.
14
14
15We also execute tests on MacOS (darwin). The darwin channel is usually
15We also execute tests on MacOS (darwin). The darwin channel is usually
16−behind the NixOS channel. So we choose the `nixpkgs-19.09-darwin`
16+behind the NixOS channel. So we follow the `nixpkgs-20.09-darwin`
17−channel:
17+channel.
18−
19−```
20−nix-prefetch-git https://github.com/NixOS/nixpkgs-channels refs/heads/nixpkgs-19.09-darwin
21−```
22−
23−Keep the URL in `github.json` pointing at
24−<https://github.com/NixOS/nixpkgs>. Case matters because the Hydra
25−trusted URL whitelist is case-sensitive.
docs/tutorials/development.md+2−2
@@ -100,7 +100,7 @@ selects packages from the larger package set.
100# shell.nix
100# shell.nix
101let
101let
102 haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
102 haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
103− nixpkgs = import haskellNix.sources.nixpkgs-1909 haskellNix.nixpkgsArgs;
103+ nixpkgs = import haskellNix.sources.nixpkgs haskellNix.nixpkgsArgs;
104 haskell = nixpkgs.haskell-nix;
104 haskell = nixpkgs.haskell-nix;
105in
105in
106 haskell.haskellPackages.ghcWithPackages (ps: with ps;
106 haskell.haskellPackages.ghcWithPackages (ps: with ps;
@@ -119,7 +119,7 @@ project.
119```nix
119```nix
120let
120let
121 haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
121 haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
122− nixpkgs = import haskellNix.sources.nixpkgs-1909 haskellNix.nixpkgsArgs;
122+ nixpkgs = import haskellNix.sources.nixpkgs haskellNix.nixpkgsArgs;
123 haskell = nixpkgs.haskell-nix;
123 haskell = nixpkgs.haskell-nix;
124in
124in
125 haskell.snapshots."lts-13.18".alex.components.exes.alex
125 haskell.snapshots."lts-13.18".alex.components.exes.alex
lib/clean-source-haskell.nix+1−15
@@ -35,21 +35,7 @@ rec {
35 src = lib.cleanSource src;
35 src = lib.cleanSource src;
36 inherit name;
36 inherit name;
37 };
37 };
38− # Copy function from 19.09 for compatibility with 19.03.
39− # Does require at least Nix 2.0.
40− compat = let
41− isFiltered = src ? _isLibCleanSourceWith;
42− origSrc = if isFiltered then src.origSrc else src;
43− filter' = name: type: haskellSourceFilter name type && lib.cleanSourceFilter name type;
44− name' = if name != null then name else if isFiltered then src.name else baseNameOf src;
45− in {
46− inherit origSrc;
47− filter = filter';
48− outPath = builtins.path { filter = filter'; path = origSrc; name = name'; };
49− _isLibCleanSourceWith = true;
50− name = name';
51− };
52 in
38 in
53 if (builtins.typeOf src) == "path"
39 if (builtins.typeOf src) == "path"
54− then (if lib.versionAtLeast lib.version "19.09" then clean else compat) else src;
40+ then clean else src;
55}
41}
nix/sources.json−13
@@ -65,19 +65,6 @@
65 "url": "https://github.com/NixOS/nixpkgs/archive/732684b720f829056dcb62380c2c17e4d3ebd947.tar.gz",
65 "url": "https://github.com/NixOS/nixpkgs/archive/732684b720f829056dcb62380c2c17e4d3ebd947.tar.gz",
66 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
66 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
67 },
67 },
68− "nixpkgs-1909": {
69− "branch": "nixpkgs-19.09-darwin",
70− "builtin": false,
71− "description": "Nix Packages collection",
72− "homepage": null,
73− "owner": "NixOS",
74− "repo": "nixpkgs",
75− "rev": "9237a09d8edbae9951a67e9a3434a07ef94035b7",
76− "sha256": "05bizymljzzd665bpsjbhxamcgzq7bkjjzjfapkl2nicy774ak4x",
77− "type": "tarball",
78− "url": "https://github.com/NixOS/nixpkgs/archive/9237a09d8edbae9951a67e9a3434a07ef94035b7.tar.gz",
79− "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
80− },
81 "nixpkgs-2003": {
68 "nixpkgs-2003": {
82 "branch": "nixpkgs-20.03-darwin",
69 "branch": "nixpkgs-20.03-darwin",
83 "builtin": false,
70 "builtin": false,
overlays/default.nix−2
@@ -17,7 +17,6 @@ let
17 emscripten = import ./emscripten.nix;
17 emscripten = import ./emscripten.nix;
18 nix-prefetch-git-minimal = import ./nix-prefetch-git-minimal.nix;
18 nix-prefetch-git-minimal = import ./nix-prefetch-git-minimal.nix;
19 gobject-introspection = import ./gobject-introspection.nix;
19 gobject-introspection = import ./gobject-introspection.nix;
20− shims = import ./shims.nix;
21 eval-on-current = import ./eval-on-current.nix;
20 eval-on-current = import ./eval-on-current.nix;
22 eval-on-build = import ./eval-on-build.nix;
21 eval-on-build = import ./eval-on-build.nix;
23 ghcjs = import ./ghcjs.nix;
22 ghcjs = import ./ghcjs.nix;
@@ -51,7 +50,6 @@ let
51 nix-prefetch-git-minimal
50 nix-prefetch-git-minimal
52 ghcjs
51 ghcjs
53 gobject-introspection
52 gobject-introspection
54− shims
55 # Restore nixpkgs haskell and haskellPackages
53 # Restore nixpkgs haskell and haskellPackages
56 (_: prev: { inherit (prev.haskell-nix-prev) haskell haskellPackages; })
54 (_: prev: { inherit (prev.haskell-nix-prev) haskell haskellPackages; })
57 ];
55 ];
overlays/musl.nix−9
@@ -1,13 +1,4 @@
1final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({
1final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isMusl ({
2− # On nixpkgs 19.09 openssl is configured as `linux-generic64` instead
3− # of `linux-x86_64` and as a result the `asm` parts of of openssl
4− # are not built. Because the `no_asm` configure flag is also not passed
5− # the c versions of the functions are also not included.
6− openssl = prev.openssl.overrideAttrs (attrs:
7− prev.lib.optionalAttrs prev.stdenv.hostPlatform.isx86_64 {
8− configureScript = "./Configure linux-x86_64";
9− });
10−
11 # Prevent pkgsMusl.pkgsStatic chain
2 # Prevent pkgsMusl.pkgsStatic chain
12 busybox-sandbox-shell = prev.busybox-sandbox-shell.override { inherit (final) busybox; };
3 busybox-sandbox-shell = prev.busybox-sandbox-shell.override { inherit (final) busybox; };
13
4
overlays/shims.nixdeleted−9
@@ -1,9 +0,0 @@
1−# Shims to make older versions of nixpkgs work
2−final: prev: {
3− # nixpkgs 19.09 and older does not have runCommandLocal
4− runCommandLocal = prev.runCommandLocal or (name: env:
5− final.runCommand name ({
6− preferLocalBuild = true;
7− allowSubstitutes = false;
8− } // env));
9−}