diff --git a/.gitignore b/.gitignore index 7d49e642..a3872e73 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ playground/ *.pprof # Additional files for hosting. Workaround for now ig. public/ +# Nix build file +/result +# Go vendor directory +/vendor diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..4f0c2626 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1786384358, + "narHash": "sha256-RzPPiWeUtuvymnpuEWsdtzli5w4kjZs49FqEs3/1u+I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2fcb964de67fcf60b43471c55d5d99e61a9ccb5a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..0b09cfd7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,25 @@ +{ + description = "Scribble.rs flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: let + lib = nixpkgs.lib; + in { + packages = lib.genAttrs lib.systems.flakeExposed (system: let + pkgs = import nixpkgs { inherit system; }; + scribblers = pkgs.buildGoModule { + pname = "scribblers"; + version = "0.9.14"; + src = lib.cleanSource ./.; + vendorHash = "sha256-EsN/bfYyMkhXXeDCmTNRCxxSIjmqkNEBARbGy8UJ6xo="; + subPackages = [ "cmd/scribblers" ]; + }; + in { + scribblers = scribblers; + default = scribblers; + }); + }; +}