diff --git a/flake.lock b/flake.lock --- a/flake.lock +++ b/flake.lock @@ -18,26 +18,6 @@ "repo": "flake-utils", "type": "github" } }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "gomod2nix": { "inputs": { "flake-utils": "flake-utils", @@ -156,7 +136,6 @@ } }, "root": { "inputs": { - "gitignore": "gitignore", "gomod2nix": "gomod2nix", "htmx-src": "htmx-src", "htmx-ws-src": "htmx-ws-src", diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -37,10 +37,6 @@ sqlite-lib-src = { url = "https://sqlite.org/2024/sqlite-amalgamation-3450100.zip"; flake = false; }; - gitignore = { - url = "github:hercules-ci/gitignore.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = { @@ -51,7 +47,6 @@ indigo, htmx-src, htmx-ws-src, lucide-src, - gitignore, inter-fonts-src, sqlite-lib-src, ibm-plex-mono-src, @@ -62,7 +57,13 @@ nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system}); mkPackageSet = pkgs: pkgs.lib.makeScope pkgs.newScope (self: { - inherit (gitignore.lib) gitignoreSource; + src = let + fs = pkgs.lib.fileset; + in + fs.toSource { + root = ./.; + fileset = fs.difference (fs.intersection (fs.gitTracked ./.) (fs.fileFilter (file: !(file.hasExt "nix")) ./.)) (fs.maybeMissing ./.jj); + }; buildGoApplication = (self.callPackage "${gomod2nix}/builder" { gomod2nix = gomod2nix.legacyPackages.${pkgs.system}.gomod2nix; diff --git a/nix/pkgs/appview.nix b/nix/pkgs/appview.nix --- a/nix/pkgs/appview.nix +++ b/nix/pkgs/appview.nix @@ -8,13 +8,12 @@ inter-fonts-src, ibm-plex-mono-src, tailwindcss, sqlite-lib, - gitignoreSource, + src, }: buildGoApplication { pname = "appview"; version = "0.1.0"; - src = gitignoreSource ../..; - inherit modules; + inherit src modules; postUnpack = '' pushd source diff --git a/nix/pkgs/genjwks.nix b/nix/pkgs/genjwks.nix --- a/nix/pkgs/genjwks.nix +++ b/nix/pkgs/genjwks.nix @@ -1,13 +1,12 @@ { - gitignoreSource, + src, buildGoApplication, modules, }: buildGoApplication { pname = "genjwks"; version = "0.1.0"; - src = gitignoreSource ../..; - inherit modules; + inherit src modules; subPackages = ["cmd/genjwks"]; doCheck = false; CGO_ENABLED = 0; diff --git a/nix/pkgs/knot-unwrapped.nix b/nix/pkgs/knot-unwrapped.nix --- a/nix/pkgs/knot-unwrapped.nix +++ b/nix/pkgs/knot-unwrapped.nix @@ -2,13 +2,12 @@ { buildGoApplication, modules, sqlite-lib, - gitignoreSource, + src, }: buildGoApplication { pname = "knot"; version = "0.1.0"; - src = gitignoreSource ../..; - inherit modules; + inherit src modules; doCheck = false; diff --git a/nix/pkgs/spindle.nix b/nix/pkgs/spindle.nix --- a/nix/pkgs/spindle.nix +++ b/nix/pkgs/spindle.nix @@ -2,13 +2,12 @@ { buildGoApplication, modules, sqlite-lib, - gitignoreSource, + src, }: buildGoApplication { pname = "spindle"; version = "0.1.0"; - src = gitignoreSource ../..; - inherit modules; + inherit src modules; doCheck = false;