From 3ba8cb57fae988cae6da459190ce14e71076c641 Mon Sep 17 00:00:00 2001 From: "ryan.freumh.org" Date: Tue, 25 Mar 2025 16:58:40 +0000 Subject: [PATCH] Track Nixpkgs stable The Nix build fails on Nixpkgs 24.11 due to CGO_ENABLED being renamed to env.CGO_ENABLED https://github.com/NixOS/nixpkgs/commit/3b1ec755ca88778d4b706b6dd52b57c0086b1548 This PR changed the Nix flake Nixpkgs input to 24.11 instead of the master branch, which makes it easier to deploy with systems tracking stable Nixpkgs. --- flake.lock | 7 ++++--- flake.nix | 10 +++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index e10b5b60..03fb60cc 100644 --- a/flake.lock +++ b/flake.lock @@ -79,15 +79,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1740938536, - "narHash": "sha256-m6Lz7cRoZ8GS7tziYrNWv0WXTYtKx3oOC9Bwa6a13EA=", + "lastModified": 1742268799, + "narHash": "sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2ffed2bc3d27861b821f9bec127cf51a4dbfabb4", + "rev": "da044451c6a70518db5b730fe277b70f494188f1", "type": "github" }, "original": { "owner": "nixos", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index e53c6cb0..c011ab11 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "atproto github"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; indigo = { url = "github:oppiliappan/indigo"; flake = false; @@ -52,7 +52,7 @@ src = gitignoreSource ./.; subPackages = ["cmd/${name}"]; vendorHash = goModHash; - env.CGO_ENABLED = 0; + CGO_ENABLED = 0; }; in { indigo-lexgen = final.buildGoModule { @@ -82,7 +82,7 @@ doCheck = false; subPackages = ["cmd/appview"]; vendorHash = goModHash; - env.CGO_ENABLED = 1; + CGO_ENABLED = 1; stdenv = pkgsStatic.stdenv; }; @@ -105,7 +105,7 @@ runHook postInstall ''; - env.CGO_ENABLED = 1; + CGO_ENABLED = 1; }; knotserver-unwrapped = final.pkgsStatic.buildGoModule { pname = "knotserver"; @@ -113,7 +113,7 @@ src = gitignoreSource ./.; subPackages = ["cmd/knotserver"]; vendorHash = goModHash; - env.CGO_ENABLED = 1; + CGO_ENABLED = 1; }; repoguard = buildCmdPackage "repoguard"; keyfetch = buildCmdPackage "keyfetch"; -- knotmirror 0.0.1