From e27ddc4b9f663d90edcc4937d38443f095ddd7ee Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Fri, 22 Dec 2023 20:05:19 -0500 Subject: [PATCH 1/5] Update version of `buildGoModule` used in `flake.nix` --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 099840c..7c4fc7f 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,7 @@ packwiz = pkgs.callPackage ./nix { version = substring 0 8 self.rev or "dirty"; vendorSha256 = readFile ./nix/vendor-sha256; - buildGoModule = pkgs.buildGo119Module; + buildGoModule = pkgs.buildGoModule; }; # Build packwiz by default when no package name is specified default = packwiz; From d3f58e025a62551ab3d430f2895fcc4bb714ff3a Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Fri, 22 Dec 2023 21:12:15 -0500 Subject: [PATCH 2/5] Update Nix `flake.lock` to use newer version of Nixpkgs `nixos-unstable` branch. --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 63ea6b3..cbc8415 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689444953, - "narHash": "sha256-0o56bfb2LC38wrinPdCGLDScd77LVcr7CrH1zK7qvDg=", + "lastModified": 1703013332, + "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8acef304efe70152463a6399f73e636bcc363813", + "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", "type": "github" }, "original": { From 23311218a108a54d9a56d6a6849e3a5670fb001f Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Fri, 22 Dec 2023 21:23:57 -0500 Subject: [PATCH 3/5] Add some notes to `flake.nix` and `nix/prefetcher.nix` Notes are to describe `pkgs.buildGoModule` mapping in Nixpkgs. --- flake.nix | 2 ++ nix/prefetcher.nix | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 7c4fc7f..0cb1692 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,8 @@ version = substring 0 8 self.rev or "dirty"; vendorSha256 = readFile ./nix/vendor-sha256; buildGoModule = pkgs.buildGoModule; + # As of writing, `pkgs.buildGoModule` is aliased to + # `pkgs.buildGo121Module` in Nixpkgs. }; # Build packwiz by default when no package name is specified default = packwiz; diff --git a/nix/prefetcher.nix b/nix/prefetcher.nix index 5362219..18ee3f6 100644 --- a/nix/prefetcher.nix +++ b/nix/prefetcher.nix @@ -3,13 +3,12 @@ pkgs ? import {}, }: pkgs.callPackage (import ./.) { - ## Keeping `buildGoModule` commented out in case it's needed in the future. - ## As of writing, `buildGo121Module` is currently used as the default for - ## `buildGoModule` in nixpkgs. `buildGo118Module` seems deprecated and - ## entirely removed from nixpkgs, so manually setting that is likely to cause - ## issues in the future. - # buildGoModule = pkgs.buildGo118Module; + buildGoModule = pkgs.buildGoModule; + ## As of writing, `pkgs.buildGoModule` is aliased to + ## `pkgs.buildGo121Module` in Nixpkgs. + ## `buildGoModule` is set as `pkgs.buildGoModule` to try and work around + ## `vendorHash` issues in the future. vendorSha256 = sha256; } // { From 79cb91a41e6038d5a0447219b79cac94177e7b04 Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Sat, 23 Dec 2023 21:06:36 -0500 Subject: [PATCH 4/5] Edit `flake.nix`'s `inputs.nixpkgs.url` to be a little more verbose. --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 0cb1692..fc5c157 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; outputs = { self, From 530dd1499d009df05606ea31a853eca2e7e65924 Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Sun, 24 Dec 2023 15:38:25 -0500 Subject: [PATCH 5/5] Add a small note to how `inputs.nixpkgs.url` maps to a Repo URL. --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index fc5c157..31f46ec 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,7 @@ { inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + # This maps to https://github.com/NixOS/nixpkgs/tree/nixos-unstable + # The `url` option is the pattern of `github:USER_OR_ORG/REPO/BRANCH` outputs = { self,