aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/bash-libs/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /flakes/mypackages/pkgs/bash-libs/default.nix
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'flakes/mypackages/pkgs/bash-libs/default.nix')
-rw-r--r--flakes/mypackages/pkgs/bash-libs/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/bash-libs/default.nix b/flakes/mypackages/pkgs/bash-libs/default.nix
new file mode 100644
index 0000000..991c9d2
--- /dev/null
+++ b/flakes/mypackages/pkgs/bash-libs/default.nix
@@ -0,0 +1,33 @@
1{ lib, stdenv, fetchFromGitHub, makeWrapper, shellcheck, bashInteractive, coreutils, gnugrep, gawk, file, aspell, util-linux, gnused }:
2stdenv.mkDerivation {
3 pname = "bash-libs";
4 version = "master";
5 src = fetchFromGitHub {
6 owner = "foopgp";
7 repo = "bash-libs";
8 rev = "4bf7fe3a488f55beecc74b76e0daf24244bd824f";
9 sha256 = "sha256-8AHUXPd1dQpo1Ce9MT4++eFhJT3X8SYtgaIKbPFUYjM=";
10 };
11
12 buildInputs = [ shellcheck makeWrapper bashInteractive ];
13 phases = [ "checkPhase" "installPhase" ];
14 checkPhase = ''
15 shellcheck bin/*
16 '';
17 installPhase =
18 let binPath = lib.makeBinPath [
19 coreutils file aspell util-linux gnused gnugrep gawk
20 ];
21 in ''
22 mkdir -p $out/bin $out/nix-support $out/share/doc/bash-libs $out/share/bash-libs/include
23
24 for i in $src/bin/*; do
25 name=$(basename $i)
26 cp "$i" $out/share/bash-libs/include
27 patchShebangs $out/share/bash-libs/include/$name
28 makeWrapper $out/share/bash-libs/include/$name $out/bin/$name --set PATH ${binPath}
29 done
30 echo "${binPath}" > $out/nix-support/propagated-build-inputs
31 cp $src/man/* $out/share/doc/bash-libs
32 '';
33}