on iko/ghcjs-patch-master help sign in
Drop 19.09 support (#947)

* Drop 19.09 support This is a year old. NixOS doesn't even support the last stable release, let alone the one before that. Also cuts our CI size by a third, which is always nice. * Remove 19.09 compatibility pieces

commit20b66292056fd8b338303101ba3ef7a288c9bf24 authorMichael Peyton Jones <michael.peyton-jones@iohk.io> dateThu 26 Nov 2020, 21:34 (6 years ago) parent1dce3ff
8 files changed+10−66
ci.nix−1 docs/dev/nixpkgs-pin.md+7−15 docs/tutorials/development.md+2−2 lib/clean-source-haskell.nix+1−15 nix/sources.json−13 overlays/default.nix−2 overlays/musl.nix−9 overlays/shims.nix−9
ci.nix−1
@@ -9,7 +9,6 @@
99 inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
1010 sources = import ./nix/sources.nix {};
1111 nixpkgsVersions = {
12− "R1909" = "nixpkgs-1909";
1312 "R2003" = "nixpkgs-2003";
1413 "R2009" = "nixpkgs-2009";
1514 };
docs/dev/nixpkgs-pin.md+7−15
@@ -1,25 +1,17 @@
11# Haskell.nix Nixpkgs Pin
22
3−Haskell.nix contains a Nixpkgs pin in
4−[`nixpkgs/github.json`](https://github.com/input-output-hk/haskell.nix/blob/master/nixpkgs/github.json).
5−This is the version of Nixpkgs used for builds of `nix-tools` and
6−running the tests.
3+Haskell.nix contains several Nixpkgs pins imanaged by `niv` in
4+`nix/sources.json`.
5+
6+These are used in testing various versions of nixpkgs.
77
88To use haskell.nix the `config` and `overlays` need to be applied to
99Nixpkgs. Users should probably pin a suitable version of nixpkgs, although things might not work for them if their Nixpkgs version is
1010too different.
1111
1212We 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.
1414
1515We also execute tests on MacOS (darwin). The darwin channel is usually
16−behind the NixOS channel. So we choose the `nixpkgs-19.09-darwin`
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.
16+behind the NixOS channel. So we follow the `nixpkgs-20.09-darwin`
17+channel.
docs/tutorials/development.md+2−2
@@ -100,7 +100,7 @@ selects packages from the larger package set.
100100# shell.nix
101101let
102102 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;
104104 haskell = nixpkgs.haskell-nix;
105105in
106106 haskell.haskellPackages.ghcWithPackages (ps: with ps;
@@ -119,7 +119,7 @@ project.
119119```nix
120120let
121121 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;
123123 haskell = nixpkgs.haskell-nix;
124124in
125125 haskell.snapshots."lts-13.18".alex.components.exes.alex
lib/clean-source-haskell.nix+1−15
@@ -35,21 +35,7 @@ rec {
3535 src = lib.cleanSource src;
3636 inherit name;
3737 };
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− };
5238 in
5339 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;
5541}
nix/sources.json−13
@@ -65,19 +65,6 @@
6565 "url": "https://github.com/NixOS/nixpkgs/archive/732684b720f829056dcb62380c2c17e4d3ebd947.tar.gz",
6666 "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
6767 },
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− },
8168 "nixpkgs-2003": {
8269 "branch": "nixpkgs-20.03-darwin",
8370 "builtin": false,
overlays/default.nix−2
@@ -17,7 +17,6 @@ let
1717 emscripten = import ./emscripten.nix;
1818 nix-prefetch-git-minimal = import ./nix-prefetch-git-minimal.nix;
1919 gobject-introspection = import ./gobject-introspection.nix;
20− shims = import ./shims.nix;
2120 eval-on-current = import ./eval-on-current.nix;
2221 eval-on-build = import ./eval-on-build.nix;
2322 ghcjs = import ./ghcjs.nix;
@@ -51,7 +50,6 @@ let
5150 nix-prefetch-git-minimal
5251 ghcjs
5352 gobject-introspection
54− shims
5553 # Restore nixpkgs haskell and haskellPackages
5654 (_: prev: { inherit (prev.haskell-nix-prev) haskell haskellPackages; })
5755 ];
overlays/musl.nix−9
@@ -1,13 +1,4 @@
11final: 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−
112 # Prevent pkgsMusl.pkgsStatic chain
123 busybox-sandbox-shell = prev.busybox-sandbox-shell.override { inherit (final) busybox; };
134
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−}