From dadf1a1623ba4998101357d853c7c8fd35285647 Mon Sep 17 00:00:00 2001 From: Devon Stewart Date: Wed, 9 Oct 2024 22:17:00 +0000 Subject: [PATCH 1/5] nix flake update --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 61ca6a6..1dad8d7 100644 --- a/flake.lock +++ b/flake.lock @@ -48,11 +48,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1728282832, - "narHash": "sha256-I7AbcwGggf+CHqpyd/9PiAjpIBGTGx5woYHqtwxaV7I=", + "lastModified": 1728455642, + "narHash": "sha256-abYGwrL6ak5sBRqwPh+V3CPJ6Pa89p378t51b7BO1lE=", "owner": "nix-community", "repo": "fenix", - "rev": "1ec71be1f4b8f3105c5d38da339cb061fefc43f4", + "rev": "3b47535a5c782e4f4ad59cd4bdb23636b6926e03", "type": "github" }, "original": { @@ -169,11 +169,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1723948777, - "narHash": "sha256-rX14joTzvRUiCfmCT0LUMV3Mxi79VJANcKB/kkh7Qys=", + "lastModified": 1726716330, + "narHash": "sha256-mIuOP4I51eFLquRaxMKx67pHmhatZrcVPjfHL98v/M8=", "owner": "oxalica", "repo": "nil", - "rev": "4f3081d1f10bb61f197b780e67f426e53f818691", + "rev": "c8e8ce72442a164d89d3fdeaae0bcc405f8c015a", "type": "github" }, "original": { @@ -200,11 +200,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1725503534, - "narHash": "sha256-hd1eRyPtTkRnAPYpnEfzugQwAifVYMmOR3z+MTTSw+g=", + "lastModified": 1728409405, + "narHash": "sha256-kk530XBUGDpt0DQbyUb3yDpSddPqF9PA5KTo/nsmmg0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fcb54ddcc974cff59bdfb7c1ac9e080299763d2d", + "rev": "1366d1af8f58325602280e43ed6233849fb92216", "type": "github" }, "original": { @@ -270,11 +270,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1728249780, - "narHash": "sha256-J269DvCI5dzBmPrXhAAtj566qt0b22TJtF3TIK+tMsI=", + "lastModified": 1728386838, + "narHash": "sha256-Lk64EoJkvp3WMGVJK3CR1TYcNghX0/BqHPLW5zdvmLE=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "2b750da1a1a2c1d2c70896108d7096089842d877", + "rev": "efaf8bd5de34e2f47bd57425b83e0c7974902176", "type": "github" }, "original": { @@ -292,11 +292,11 @@ ] }, "locked": { - "lastModified": 1722824458, - "narHash": "sha256-2k3/geD5Yh8JT1nrGaRycje5kB0DkvQA/OUZoel1bIU=", + "lastModified": 1726453838, + "narHash": "sha256-pupsow4L79SBfNwT6vh/5RAbVZuhngIA0RTCZksXmZY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "a8a937c304e62a5098c6276c9cdf65c19a43b1a5", + "rev": "ca2e79cd22625d214b8437c2c4080ce79bd9f7d2", "type": "github" }, "original": { @@ -357,11 +357,11 @@ ] }, "locked": { - "lastModified": 1724710535, - "narHash": "sha256-iw6I7yhXBbanIUi3VHXIveXDXF9BrakwAflQ76/pxDg=", + "lastModified": 1726178208, + "narHash": "sha256-WppAdNVzhB79d4BtkzpqDBruw/XhGtw7Ra6qqHE4vPs=", "owner": "replit", "repo": "ztoc-rs", - "rev": "977661eba22f474a9fddd1ff1fcd63b6acadc902", + "rev": "94a02a9a2e51dff2ecb6791e27f7ad5983ba9a28", "type": "github" }, "original": { From 2f5fe2cfc42e51796fc5ee22d700ac22021b43eb Mon Sep 17 00:00:00 2001 From: Devon Stewart Date: Wed, 9 Oct 2024 22:30:57 +0000 Subject: [PATCH 2/5] Bumping go --- pkgs/historical-modules/default.nix | 9 +++++++++ pkgs/modules/default.nix | 11 +++++++++-- pkgs/modules/docker/default.nix | 6 +++--- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/historical-modules/default.nix b/pkgs/historical-modules/default.nix index 455388d..061a690 100644 --- a/pkgs/historical-modules/default.nix +++ b/pkgs/historical-modules/default.nix @@ -78,6 +78,15 @@ let displayVersion = "1.20"; }; } + { + moduleId = "go-1.21"; + commit = "b5aa5df636c4cd8cd1aea251e8dea4fc0aa51781"; + overrides = { + # /nix/store/q6j9za8smkdbnlybg63qq5lmj7zbambr-replit-module-go-1.20 + # .runners["go-run"].displayVersion = "1.20.4"; + displayVersion = "1.21"; + }; + } { moduleId = "haskell-ghc9.0"; commit = "c48c43c6c698223ed3ce2abc5a2d708735a77d5b"; diff --git a/pkgs/modules/default.nix b/pkgs/modules/default.nix index cd53da1..84f4349 100644 --- a/pkgs/modules/default.nix +++ b/pkgs/modules/default.nix @@ -64,9 +64,16 @@ let (import ./nodejs-with-prybar) (import ./go { - go = pkgs.go_1_21; + go = pkgs.go_1_22; gopls = pkgs.gopls.override { - buildGoModule = pkgs.buildGo121Module; + buildGoModule = pkgs.buildGo122Module; + }; + }) + + (import ./go { + go = pkgs.go_1_23; + gopls = pkgs.gopls.override { + buildGoModule = pkgs.buildGo123Module; }; }) diff --git a/pkgs/modules/docker/default.nix b/pkgs/modules/docker/default.nix index 3d8ed06..9ada8fc 100644 --- a/pkgs/modules/docker/default.nix +++ b/pkgs/modules/docker/default.nix @@ -4,7 +4,7 @@ let configFiles = pkgs.copyPathToStore ./etc; - replit-runc = pkgs.buildGo121Module { + replit-runc = pkgs.buildGo123Module { pname = "replit-runc"; version = "1.1.9+replit"; @@ -30,7 +30,7 @@ let ''; }; - replit-containerd = pkgs.buildGo121Module { + replit-containerd = pkgs.buildGo123Module { pname = "replit-containerd"; version = "1.7.5+replit"; @@ -65,7 +65,7 @@ let replitShimRunc = replit-containerd; }; - replit-buildkit = pkgs.buildGo121Module { + replit-buildkit = pkgs.buildGo123Module { pname = "replit-buildkit"; version = "v0.13.0-beta1+replit"; From a2ad64eb09c6de5b96b6e60b82d650c61e13a35f Mon Sep 17 00:00:00 2001 From: Devon Stewart Date: Wed, 9 Oct 2024 22:44:11 +0000 Subject: [PATCH 3/5] Upgrading go to new package builder --- pkgs/modules/docker/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/modules/docker/default.nix b/pkgs/modules/docker/default.nix index 9ada8fc..d349e48 100644 --- a/pkgs/modules/docker/default.nix +++ b/pkgs/modules/docker/default.nix @@ -99,10 +99,9 @@ let replitShimRunc = replit-containerd; }; - mobyGoPackagePath = "github.com/docker/docker"; mobyVersion = "24.0.7+replit"; - replit-moby = pkgs.buildGoPackage { + replit-moby = pkgs.buildGoModule { pname = "replit-moby"; version = mobyVersion; @@ -113,7 +112,7 @@ let sha256 = "sha256-VUgsclXkoHHNT+GgYL7qiCV/4V3P9RZrT9BegMVYaRU="; }; - goPackagePath = mobyGoPackagePath; + vendorHash = null; nativeBuildInputs = [ pkgs.makeWrapper pkgs.pkg-config pkgs.go pkgs.libtool ]; @@ -133,7 +132,7 @@ let buildPhase = '' export GOCACHE="$TMPDIR/go-cache" # build engine - cd ./go/src/${mobyGoPackagePath} + cd ./go/src export AUTO_GOPATH=1 export DOCKER_GITCOMMIT="v${mobyVersion}" export VERSION="${mobyVersion}" @@ -142,7 +141,7 @@ let ''; postInstall = '' - cd ./go/src/${mobyGoPackagePath} + cd ./go/src install -Dm755 ./bundles/dynbinary-daemon/dockerd $out/libexec/docker/replit-dockerd makeWrapper $out/libexec/docker/replit-dockerd $out/bin/replit-dockerd \ From 78d7030c46753525570daab3d08a68dd475e2fc5 Mon Sep 17 00:00:00 2001 From: Devon Stewart Date: Thu, 10 Oct 2024 16:50:45 +0000 Subject: [PATCH 4/5] Dereferencing activeModules if available --- pkgs/historical-modules/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/historical-modules/default.nix b/pkgs/historical-modules/default.nix index 061a690..6bc8195 100644 --- a/pkgs/historical-modules/default.nix +++ b/pkgs/historical-modules/default.nix @@ -203,11 +203,16 @@ let moduleFromHistory = { moduleId, commit, deployment ? false, overrides }: let flake = getFlake "github:replit/nixmodules/${commit}"; + flakeMods = + if pkgs.lib.hasAttr "activeModules" flake then + flake.activeModules + else + flake.modules; module = if deployment then - (flake.deploymentModules or flake.modules).${moduleId} + (flake.deploymentModules or flakeMods).${moduleId} else - flake.modules.${moduleId}; + flakeMods.${moduleId}; in pkgs.stdenvNoCC.mkDerivation { name = "replit-module-${moduleId}"; From 404022fb1c48d0e4279c23df4efa62a226eb655a Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Fri, 11 Oct 2024 10:28:26 -0700 Subject: [PATCH 5/5] fix go-1.21 historical module --- README.md | 6 ++++++ pkgs/historical-modules/default.nix | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dd593d3..204bf03 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,9 @@ or ``` nix build .#custom-bundle-squashfs ``` + +## Adding modules to historical modules + +pkgs/historical-modules/default.nix provides a list of modules that are still active but we no longer maintain and build. + +To add a new historical module, you need to pick a commit of the nix modules repo that has that module in it. This commit's src code will be used to build this module. diff --git a/pkgs/historical-modules/default.nix b/pkgs/historical-modules/default.nix index 6bc8195..00403f1 100644 --- a/pkgs/historical-modules/default.nix +++ b/pkgs/historical-modules/default.nix @@ -80,10 +80,10 @@ let } { moduleId = "go-1.21"; - commit = "b5aa5df636c4cd8cd1aea251e8dea4fc0aa51781"; + commit = "00fa9ccbbd30ded08a8ab54259490102f21905b7"; overrides = { - # /nix/store/q6j9za8smkdbnlybg63qq5lmj7zbambr-replit-module-go-1.20 - # .runners["go-run"].displayVersion = "1.20.4"; + # /nix/store/vjdwykj1l3hkr5hzjdr4m1m2mq8vxj0i-replit-module-go-1.21 + # .runners["go-run"].displayVersion = "1.21.13"; displayVersion = "1.21"; }; }