Home

gomodinit @main - refs - log -
-
https://git.jolheiser.com/gomodinit.git
go mod init
tree log patch
feat: flake Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmWE4LUACgkQuFOtpdp7 v3oYDQ/+MAIYakaQY1DVPqAw5lByZ7L7Q29niV9Zj5h4lm1g+zKWd4noq7mHrbsf f0GmUBLMuWW6WQ5Hi0EzugzujCo0m5y5LOv5cBBP2OigU5hcgb4AJYCOd515mTKj FBWcugRBZE7hMLbzDdn+r+2ZO7Rdwz7hCXcZ9S17jnlXqWYHH2AkbeBErJlojf+t DBQgEPCeRyMbh0CvFU+QDhB8k4Sg0ML9wsO2Cx8ObbyFjM++QIA/H6Np3iiGQqfn c2dXEJtHucp/ghdngHK6JKBEdmIFQ3PMUUnb3OhQp16jyCiLZ409szaYMtf2AMnG nmarU+iDap9vMNH5wwS0Xh/22va1yYPnKMSWYigbL4kvBWer58M/+8pRKZPqY+WO rwNBkcuM17CFD3QHRQIUUsY2wdqessE0uTNsl/swyMAuE8n8mt6AXal02jBIzNNu ZE1404pl6gpeWex2GQp3gzoac0ZMRwkSOkXEoGaR8mFZEw0LX2zeKJyphlY9Sd57 IJMoFoSLPyJBEnTCrYZH3sr3eYWs9FIg2Cl9ly3PacNFEcQZ0rPTTNb+R4NrMmd+ T2ZPuZv4Rm3gY4NWwt1rwu9ggLtcjMpvfsoqGCfQ6dpFtinae4FttB5+OkeJA4Xf 3XkYRh3bBnTsdOGaxVzPkkpyiRtioXjf43pexrgBuycB76BoyzE= =Fiqt -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
11 months ago
2 changed files, 65 additions(+), 0 deletions(-)
I flake.lock
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000000000000000000000000000000000000..e8408a257429bfbc70205e5e649685f7138b5a0b
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,26 @@
+{
+  "nodes": {
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1703206931,
+        "narHash": "sha256-GHJl3HHdH4jWjRVBuyDRIaUoNNMTuVbw0i9+EaYzcBU=",
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "rev": "bfbfb344598544058481e254b9f0f174d05b5e6a",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nixos",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "nixpkgs": "nixpkgs"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
I flake.nix
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000000000000000000000000000000000000..7932d88c212d8543d03ab1b5c6a0eb7c592d99be
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,39 @@
+{
+  description = "go mod init";
+
+  inputs.nixpkgs.url = "github:nixos/nixpkgs";
+
+  outputs = {
+    self,
+    nixpkgs,
+  }: let
+    system = "x86_64-linux";
+    pkgs = nixpkgs.legacyPackages.${system};
+  in {
+    packages.${system}.default = pkgs.buildGoModule rec {
+      pname = "gomodinit";
+      version = "0.1.1";
+      src = ./.;
+      vendorHash = "sha256-7RMTRFHYgzQD7K5JDdjV7ABg6BpCZbQXS9gSRlm27X8=";
+      ldflags = [
+        "-s"
+        "-w"
+        "-X=main.Version=${version}"
+      ];
+
+      meta = with pkgs.lib; {
+        description = "go mod init";
+        homepage = "https://git.jojodev.com/jolheiser/gomodinit";
+        maintainers = with maintainers; [jolheiser];
+        mainProgram = "gomodinit";
+      };
+    };
+
+    devShells.${system}.default = pkgs.mkShell {
+      nativeBuildInputs = with pkgs; [
+        go
+        gopls
+      ];
+    };
+  };
+}