mirror of
https://github.com/nix-community/nix-direnv.git
synced 2024-08-16 23:10:24 +03:00
Merge pull request #455 from nix-community/sort-fix
make version sort compatible with busybox sort
This commit is contained in:
commit
7ff4427a70
2
direnvrc
2
direnvrc
@ -38,7 +38,7 @@ _nix() {
|
||||
|
||||
_require_version() {
|
||||
local cmd=$1 version=$2 required=$3
|
||||
if ! printf "%s\n" "$required" "$version" | sort --check=quiet --version-sort; then
|
||||
if ! printf "%s\n" "$required" "$version" | LC_ALL=C sort -c -V 2>/dev/null; then
|
||||
_nix_direnv_fatal \
|
||||
"minimum required $(basename "$cmd") version is $required (installed: $version)"
|
||||
fi
|
||||
|
20
flake.nix
20
flake.nix
@ -19,7 +19,10 @@
|
||||
outputs = inputs @ { flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; }
|
||||
({ lib, ... }: {
|
||||
imports = [ ./treefmt.nix ];
|
||||
imports = [
|
||||
./treefmt.nix
|
||||
./pkgs/bash4/flake-module.nix
|
||||
];
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
@ -37,21 +40,6 @@
|
||||
test-runner-unstable = pkgs.callPackage ./test-runner.nix {
|
||||
nixVersion = "unstable";
|
||||
};
|
||||
bash4 = pkgs.bash.overrideAttrs (_old: {
|
||||
name = "bash-4.4";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz";
|
||||
hash = "sha256-2GszksEgLo/1pCOzAuYoTbf49DXqnzm1sbIP06w238s=";
|
||||
};
|
||||
patches = [ ];
|
||||
});
|
||||
direnv-bash4 = pkgs.direnv.override {
|
||||
bash = config.packages.bash4;
|
||||
};
|
||||
test-runner-bash4 = pkgs.callPackage ./test-runner.nix {
|
||||
nixVersion = "stable";
|
||||
direnv = config.packages.direnv-bash4;
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = pkgs.callPackage ./shell.nix {
|
||||
|
27
pkgs/bash4/bash-4.4-patches.nix
Normal file
27
pkgs/bash4/bash-4.4-patches.nix
Normal file
@ -0,0 +1,27 @@
|
||||
# Automatically generated by `update-patch-set.sh'; do not edit.
|
||||
|
||||
patch: [
|
||||
(patch "001" "03vzy7qwjdd5qvl3ydg99naazas2qmyd0yhnrflgjbbm64axja1y")
|
||||
(patch "002" "0lrwq6vyqism3yqv9s7kzaf3dsl4q5w9r5svcqz279qp7qca083h")
|
||||
(patch "003" "1chqww2rj6g42b8s60q5zlzy0jzp684jkpsbrbfy1vzxja8mmpsi")
|
||||
(patch "004" "1cy8abf96hkrjhw921ndr0shlcnc52bg45rn6xri4v5clhq0l25d")
|
||||
(patch "005" "0a8515kyk4zsgmvlqvlganjfr7pq0j6kzpr4d6xx02kpbdr4n7i2")
|
||||
(patch "006" "1f24wgqngmj2mrj9yibwvc2zvlmn5xi53mnw777g3l40c4m2x3ka")
|
||||
(patch "007" "1bzdsnqaf05gdbqpsixhan8vygjxpcxlz1dd8d9f5jdznw3wq76y")
|
||||
(patch "008" "1firw915mjm03hbbw9a70ch3cpgrgnvqjpllgdnn6csr8q04f546")
|
||||
(patch "009" "0g1l56kvw61rpw7dqa9fcl9llkl693h73g631hrhxlm030ddssqb")
|
||||
(patch "010" "01lfhrkdsdkdz8ypzapr614ras23x7ckjnr60aa5bzkaqprccrc4")
|
||||
(patch "011" "038p7mhnq9m65g505hi3827jkf9f35nd1cy00w8mwafpyxp44mnx")
|
||||
(patch "012" "0gh6lbb1rwpk44pvbamm6vzdfi50xnwkqd9v7s8cjwk3pz973hps")
|
||||
(patch "013" "1djkx0w9v62q78gz3jsvamj1jq53i6hbfrfhhsw86ihwpjnfy98v")
|
||||
(patch "014" "0z5ikcq9zyxw79d0z36r5p0mspnb5piavbv03jmlan1wnknmrxx7")
|
||||
(patch "015" "09n307fi1j257abhm295k6ksmnzw47ka2zhnr0i5lbdnpvn04xnk")
|
||||
(patch "016" "1cgi1y6mifm8hsgv4avj5ih76535js3qba1sqwbfvp7si76927sh")
|
||||
(patch "017" "0w6jpj2giakji1ir83rpkx1y7n7xqppah3j748m6dm38hywr0gvp")
|
||||
(patch "018" "1k58h4wxbsg7r4rwhrvzx5hfbapba2nxjysbhh6qp6ki5ys99i2v")
|
||||
(patch "019" "07n1i5610lbs672x1s8g82qn3qfj06s0ip3z80sri0g8vxp0s5r7")
|
||||
(patch "020" "0b2jk5n1af1vh590qfc52hv65mafb4vl1xv26s8j5a3byb5y4h0q")
|
||||
(patch "021" "1hblcd2xmqqlp0idnavw66570n7m0yv5rbbr873c2gkn982mk3xx")
|
||||
(patch "022" "0yfbjzr79vzjs2hyi5m8iy2b38fq7vikdfa4zqdvjsp36q4iycs5")
|
||||
(patch "023" "1dlism6qdx60nvzj0v7ndr7lfahl4a8zmzckp13hqgdx7xpj7v2g")
|
||||
]
|
15
pkgs/bash4/default.nix
Normal file
15
pkgs/bash4/default.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ bash, fetchurl }:
|
||||
|
||||
bash.overrideAttrs (_old: {
|
||||
name = "bash-4.4";
|
||||
src = fetchurl {
|
||||
url = "https://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz";
|
||||
hash = "sha256-2GszksEgLo/1pCOzAuYoTbf49DXqnzm1sbIP06w238s=";
|
||||
};
|
||||
|
||||
# generated with update-patch-set.sh from nixpkgs/pkgs/shells/bash
|
||||
patches = import ./bash-4.4-patches.nix (nr: sha256: fetchurl {
|
||||
url = "mirror://gnu/bash/bash-4.4-patches/bash44-${nr}";
|
||||
inherit sha256;
|
||||
});
|
||||
})
|
13
pkgs/bash4/flake-module.nix
Normal file
13
pkgs/bash4/flake-module.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ self, withSystem, ... }: {
|
||||
flake.packages.x86_64-linux = withSystem "x86_64-linux"
|
||||
({ pkgs, ... }: {
|
||||
bash4 = pkgs.callPackage ./. { };
|
||||
direnv-bash4 = pkgs.direnv.override {
|
||||
bash = self.packages.x86_64-linux.bash4;
|
||||
};
|
||||
test-runner-bash4 = pkgs.callPackage ../../test-runner.nix {
|
||||
nixVersion = "stable";
|
||||
direnv = self.packages.x86_64-linux.direnv-bash4;
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user