Skip to content

Commit 9aabbd7

Browse files
committed
nixpkgs: filter out old nixpkgs versions
1 parent e20c2ab commit 9aabbd7

File tree

2 files changed

+9
-118
lines changed

2 files changed

+9
-118
lines changed

nix/sources.json

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,5 @@
11
{
22
"pins": {
3-
"18.09": {
4-
"type": "Git",
5-
"repository": {
6-
"type": "GitHub",
7-
"owner": "nixos",
8-
"repo": "nixpkgs"
9-
},
10-
"branch": "nixos-18.09",
11-
"submodules": false,
12-
"revision": "a7e559a5504572008567383c3dc8e142fa7a8633",
13-
"url": "https://github.com/nixos/nixpkgs/archive/a7e559a5504572008567383c3dc8e142fa7a8633.tar.gz",
14-
"hash": "16j95q58kkc69lfgpjkj76gw5sx8rcxwi3civm0mlfaxxyw9gzp6"
15-
},
16-
"19.03": {
17-
"type": "Git",
18-
"repository": {
19-
"type": "GitHub",
20-
"owner": "nixos",
21-
"repo": "nixpkgs"
22-
},
23-
"branch": "nixos-19.03",
24-
"submodules": false,
25-
"revision": "34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59",
26-
"url": "https://github.com/nixos/nixpkgs/archive/34c7eb7545d155cc5b6f499b23a7cb1c96ab4d59.tar.gz",
27-
"hash": "11z6ajj108fy2q5g8y4higlcaqncrbjm3dnv17pvif6avagw4mcb"
28-
},
29-
"19.09": {
30-
"type": "Git",
31-
"repository": {
32-
"type": "GitHub",
33-
"owner": "nixos",
34-
"repo": "nixpkgs"
35-
},
36-
"branch": "nixos-19.09",
37-
"submodules": false,
38-
"revision": "75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1",
39-
"url": "https://github.com/nixos/nixpkgs/archive/75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1.tar.gz",
40-
"hash": "157c64220lf825ll4c0cxsdwg7cxqdx4z559fdp7kpz0g6p8fhhr"
41-
},
42-
"20.03": {
43-
"type": "Git",
44-
"repository": {
45-
"type": "GitHub",
46-
"owner": "nixos",
47-
"repo": "nixpkgs"
48-
},
49-
"branch": "nixos-20.03",
50-
"submodules": false,
51-
"revision": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205",
52-
"url": "https://github.com/nixos/nixpkgs/archive/1db42b7fe3878f3f5f7a4f2dc210772fd080e205.tar.gz",
53-
"hash": "05k9y9ki6jhaqdhycnidnk5zrdzsdammbk5lsmsbz249hjhhgcgh"
54-
},
55-
"20.09": {
56-
"type": "Git",
57-
"repository": {
58-
"type": "GitHub",
59-
"owner": "nixos",
60-
"repo": "nixpkgs"
61-
},
62-
"branch": "nixos-20.09",
63-
"submodules": false,
64-
"revision": "1c1f5649bb9c1b0d98637c8c365228f57126f361",
65-
"url": "https://github.com/nixos/nixpkgs/archive/1c1f5649bb9c1b0d98637c8c365228f57126f361.tar.gz",
66-
"hash": "0f2nvdijyxfgl5kwyb4465pppd5vkhqxddx6v40k2s0z9jfhj0xl"
67-
},
68-
"21.05": {
69-
"type": "Git",
70-
"repository": {
71-
"type": "GitHub",
72-
"owner": "nixos",
73-
"repo": "nixpkgs"
74-
},
75-
"branch": "nixos-21.05",
76-
"submodules": false,
77-
"revision": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf",
78-
"url": "https://github.com/nixos/nixpkgs/archive/022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf.tar.gz",
79-
"hash": "12q00nbd7fb812zchbcnmdg3pw45qhxm74hgpjmshc2dfmgkjh4n"
80-
},
81-
"21.11": {
82-
"type": "Git",
83-
"repository": {
84-
"type": "GitHub",
85-
"owner": "nixos",
86-
"repo": "nixpkgs"
87-
},
88-
"branch": "nixos-21.11",
89-
"submodules": false,
90-
"revision": "eabc38219184cc3e04a974fe31857d8e0eac098d",
91-
"url": "https://github.com/nixos/nixpkgs/archive/eabc38219184cc3e04a974fe31857d8e0eac098d.tar.gz",
92-
"hash": "04ffwp2gzq0hhz7siskw6qh9ys8ragp7285vi1zh8xjksxn1msc5"
93-
},
94-
"22.05": {
95-
"type": "Git",
96-
"repository": {
97-
"type": "GitHub",
98-
"owner": "nixos",
99-
"repo": "nixpkgs"
100-
},
101-
"branch": "nixos-22.05",
102-
"submodules": false,
103-
"revision": "380be19fbd2d9079f677978361792cb25e8a3635",
104-
"url": "https://github.com/nixos/nixpkgs/archive/380be19fbd2d9079f677978361792cb25e8a3635.tar.gz",
105-
"hash": "154x9swf494mqwi4z8nbq2f0sp8pwp4fvx51lqzindjfbb9yxxv5"
106-
},
107-
"22.11": {
108-
"type": "Git",
109-
"repository": {
110-
"type": "GitHub",
111-
"owner": "nixos",
112-
"repo": "nixpkgs"
113-
},
114-
"branch": "nixos-22.11",
115-
"submodules": false,
116-
"revision": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
117-
"url": "https://github.com/nixos/nixpkgs/archive/ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b.tar.gz",
118-
"hash": "1xi53rlslcprybsvrmipm69ypd3g3hr7wkxvzc73ag8296yclyll"
119-
},
1203
"23.05": {
1214
"type": "Git",
1225
"repository": {

nix/update-nixpkgs-releases.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@ writeShellApplication {
2222
| rg '^([0-9a-f]+)\trefs/heads/nixos-(\d\d\.\d\d)$' -or '$2' \
2323
| sort --reverse --version-sort \
2424
| while read -r version; do
25+
major_version=$(echo "$version" | cut -d. -f1)
26+
# filter out very old nixpkgs versions
27+
if [ "$major_version" -lt 23 ]; then
28+
if npins -d nix show | grep -q "$version"; then
29+
npins -d nix remove "$version"
30+
fi
31+
continue
32+
fi
2533
26-
if ! jq -e --arg version "$version" 'has($ARGS.named.version)' nix/sources.json >/dev/null; then
34+
if ! npins -d nix show | grep -q "$version"; then
2735
npins -d nix add --name "$version" github nixos nixpkgs --branch "nixos-$version"
2836
fi
2937
done

0 commit comments

Comments
 (0)