From 736d3ebb3a6c378bd797a6f86a4ade00a9ef89e9 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 9 Jan 2025 15:33:49 +0800 Subject: [PATCH 1/2] Problem: nixpkgs are outdated --- flake.nix | 10 ++++++---- nix/build_overlay.nix | 10 ++++++++++ nix/default.nix | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 nix/build_overlay.nix diff --git a/flake.nix b/flake.nix index ab6922dbb0..b79666dff9 100644 --- a/flake.nix +++ b/flake.nix @@ -57,9 +57,11 @@ } ) ) // { - overlay = final: super: { - go = super.go_1_23; - test-env = final.callPackage ./nix/testenv.nix { }; - }; + overlays.default = [ + (import ./nix/build_overlay.nix) + (final: super: { + test-env = final.callPackage ./nix/testenv.nix { }; + }) + ]; }; } diff --git a/nix/build_overlay.nix b/nix/build_overlay.nix new file mode 100644 index 0000000000..e20ffd098f --- /dev/null +++ b/nix/build_overlay.nix @@ -0,0 +1,10 @@ +# some basic overlays necessary for the build +final: super: { + go_1_23 = super.go_1_23.overrideAttrs (old: rec { + version = "1.23.4"; + src = final.fetchurl { + url = "https://go.dev/dl/go${version}.src.tar.gz"; + hash = "sha256-rTRaxCHpCBQpOpaZzKGd1SOCUcP2h5gLvK4oSVsmNTE="; + }; + }); +} diff --git a/nix/default.nix b/nix/default.nix index 52ee3c4684..ed31212e92 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -2,6 +2,7 @@ import sources.nixpkgs { overlays = [ + (import ./build_overlay.nix) (_: pkgs: { flake-compat = import sources.flake-compat; go = pkgs.go_1_23; From 2b0689696ac5f55f9fc26b597429e2c3938afd48 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 9 Jan 2025 15:34:08 +0800 Subject: [PATCH 2/2] use upstream --- nix/sources.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/sources.json b/nix/sources.json index 8c7a833181..754c9fc242 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -51,12 +51,12 @@ "branch": "master", "description": "Convert poetry projects to nix automagically [maintainer=@adisbladis] ", "homepage": "", - "owner": "mmsqe", + "owner": "nix-community", "repo": "poetry2nix", - "rev": "7b3eed7d8355fb0404da03964cb6c680912a9e4f", - "sha256": "03c0r1riw8zmc7m485vdsn91r8bgvhh41l7ci72zgpwlpk7dq546", + "rev": "29b2641c1c6e67d836f9a9fda8a6de85be9644ac", + "sha256": "164qi61dxw3y345bkdpiwxrk7cql7pf6kay2xi9y751ypssrji4m", "type": "tarball", - "url": "https://github.com/mmsqe/poetry2nix/archive/7b3eed7d8355fb0404da03964cb6c680912a9e4f.tar.gz", + "url": "https://github.com/nix-community/poetry2nix/archive/29b2641c1c6e67d836f9a9fda8a6de85be9644ac.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "flake-compat": {