Use gitignore.nix
commit9ed4bd50cb0b09caae354d6e44579a65a31e2d02
authorElliot Cameron <eacameron@gmail.com>
dateMon 24 Feb 2020, 16:21 (7 years ago)
parent33816aa
default.nix+3−7
@@ -9,13 +9,9 @@ let
99 inherit (reflex-platform) hackGet nixpkgs;
1010 pkgs = nixpkgs;
1111
12− cleanSource = src: pkgs.lib.cleanSourceWith {
13− filter = name: _: let baseName = builtins.baseNameOf name; in !(
14− builtins.match "^\\.ghc\\.environment.*" baseName != null ||
15− baseName == "cabal.project.local"
16− );
17− src = pkgs.lib.cleanSource src;
18− };
12+ inherit (import dep/gitignore.nix { inherit (nixpkgs) lib; }) gitignoreSource;
13+
14+ cleanSource = src: gitignoreSource (pkgs.lib.cleanSource src);
1915
2016 commandRuntimeDeps = pkgs: with pkgs; [
2117 coreutils
dep/gitignore.nix/default.nixnew file+8
@@ -0,0 +1,8 @@
1+# DO NOT HAND-EDIT THIS FILE
2+let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3+ if !fetchSubmodules && !private then builtins.fetchTarball {
4+ url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5+ } else (import <nixpkgs> {}).fetchFromGitHub {
6+ inherit owner repo rev sha256 fetchSubmodules private;
7+ };
8+in import (fetch (builtins.fromJSON (builtins.readFile ./github.json)))
dep/gitignore.nix/github.jsonnew file+8
@@ -0,0 +1,8 @@
1+{
2+ "owner": "hercules-ci",
3+ "repo": "gitignore.nix",
4+ "branch": "master",
5+ "private": false,
6+ "rev": "7415c4feb127845553943a3856cbc5cb967ee5e0",
7+ "sha256": "1zd1ylgkndbb5szji32ivfhwh04mr1sbgrnvbrqpmfb67g2g3r9i"
8+}