aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-09-06 10:17:34 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-09-06 10:17:34 +0200
commit14c7cdfdd63371e2cb154fcd41e97f9c3b459337 (patch)
tree57d42b1fd2359c25af98ba12ef0683ed596bd774
parent797e4e8fc37c29043cdf8e6b11db5f5fe00b0173 (diff)
overlay tree-grepper
-rw-r--r--anissue.nix10
-rw-r--r--default.nix5
-rw-r--r--pkgs/default.nix5
-rw-r--r--pkgs/tree-grepper.nix9
-rw-r--r--shell.nix6
5 files changed, 24 insertions, 11 deletions
diff --git a/anissue.nix b/anissue.nix
index 8df12a3..db208c5 100644
--- a/anissue.nix
+++ b/anissue.nix
@@ -10,16 +10,8 @@
, ncurses
, nix-gitignore
, stdenv
+, tree-grepper
}:
-let
- # TODO package tree-grepper in Nixpkgs so that it can reuse <nixpkgs>
- tree-grepper = (import (fetchFromGitHub {
- owner = "BrianHicks";
- repo = "tree-grepper";
- rev = "refs/tags/2.4.1";
- hash = "sha256-wHqVhx2JFBm+lc3/rruBBlpF2Ylv3/oOFM5CgX5WtKs=";
- })).default;
-in
stdenv.mkDerivation {
name = "anissue";
src = nix-gitignore.gitignoreSource [ ] ./.;
diff --git a/default.nix b/default.nix
index f453cd5..5359062 100644
--- a/default.nix
+++ b/default.nix
@@ -1,2 +1,5 @@
-{ pkgs ? import <nixpkgs> { } }:
+{ pkgs ? import <nixpkgs> {
+ overlays = [ (import ./pkgs) ];
+ }
+}:
pkgs.callPackage ./anissue.nix { }
diff --git a/pkgs/default.nix b/pkgs/default.nix
new file mode 100644
index 0000000..09ae05b
--- /dev/null
+++ b/pkgs/default.nix
@@ -0,0 +1,5 @@
+self: super: super.lib.composeManyExtensions [
+ (import ./tree-grepper.nix)
+]
+ self
+ super
diff --git a/pkgs/tree-grepper.nix b/pkgs/tree-grepper.nix
new file mode 100644
index 0000000..591bc7e
--- /dev/null
+++ b/pkgs/tree-grepper.nix
@@ -0,0 +1,9 @@
+self: super: {
+ # TODO package tree-grepper in Nixpkgs so that it can reuse <nixpkgs>
+ tree-grepper = (import (self.fetchFromGitHub {
+ owner = "BrianHicks";
+ repo = "tree-grepper";
+ rev = "refs/tags/2.4.1";
+ hash = "sha256-wHqVhx2JFBm+lc3/rruBBlpF2Ylv3/oOFM5CgX5WtKs=";
+ })).default;
+}
diff --git a/shell.nix b/shell.nix
index 8f05ecb..bc1dc79 100644
--- a/shell.nix
+++ b/shell.nix
@@ -1,4 +1,8 @@
-{ pkgs ? import <nixpkgs> {}, ... }:
+{ pkgs ? import <nixpkgs> {
+ overlays = [ (import ./pkgs) ];
+ }
+, ...
+}:
pkgs.mkShell {
buildInputs = [