flake(goModule): filter out non-pertinent files...
All checks were successful
continuous-integration/drone/push Build is passing

...such as flake files or {shell,default}.nix to reduce the necessity to
rebuild (when using `nix build`) after each change, even to non-go
files. more files can be added to an exclude list in the future.
This commit is contained in:
surtur 2022-06-13 17:39:46 +02:00
parent 7121d8f91a
commit 103bbfa528
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 30 additions and 2 deletions

@ -16,6 +16,21 @@
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1653590866,
"narHash": "sha256-E4yKIrt/S//WfW5D9IhQ1dVuaAy8RE7EiCMfnbrOC78=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "3e81a637cdf9f6e9b39aeb4d6e6394d1ad158e16",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixgl": {
"inputs": {
"nixpkgs": [
@ -55,6 +70,7 @@
"root": {
"inputs": {
"flake-compat": "flake-compat",
"nix-filter": "nix-filter",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs"
}

@ -10,9 +10,13 @@
flake = false;
inputs.nixpkgs.follows = "nixpkgs";
};
nix-filter = {
url = "github:numtide/nix-filter";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixgl, nixpkgs, ... }:
outputs = { self, nixgl, nix-filter, nixpkgs, ... }:
let
# to work with older version of flakes
@ -87,7 +91,15 @@
# In 'nix develop', we don't need a copy of the source tree
# in the Nix store.
src = lib.cleanSource ./.;
src = nix-filter.lib.filter {
root = lib.cleanSource ./.;
exclude = [
./flake.nix
./flake.lock
./default.nix
./shell.nix
];
};
meta = {
description = "an offline-capable xkcd webcomic reader written in Go";