mirror of
https://github.com/nix-community/nix-direnv.git
synced 2024-08-16 23:10:24 +03:00
Merge pull request #450 from nix-community/bash44
set bash 4.4 as minimum
This commit is contained in:
commit
943716adb5
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
os: [ ubuntu-latest ]
|
||||
# FIXME macos garbage currently collect also nix-shell that runs the test
|
||||
#os: [ ubuntu-latest, macos-latest ]
|
||||
nix: [ stable, unstable ]
|
||||
variants: [ stable, unstable, bash4 ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -23,4 +23,4 @@ jobs:
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
- run:
|
||||
"nix run --accept-flake-config .#test-runner-${{ matrix.nix }}"
|
||||
"nix run --accept-flake-config .#test-runner-${{ matrix.variants }}"
|
||||
|
2
direnvrc
2
direnvrc
@ -3,7 +3,7 @@
|
||||
NIX_DIRENV_VERSION=3.0.1
|
||||
|
||||
# min required versions
|
||||
BASH_MIN_VERSION=5.2
|
||||
BASH_MIN_VERSION=4.4
|
||||
DIRENV_MIN_VERSION=2.21.3
|
||||
NIX_MIN_VERSION=2.4
|
||||
|
||||
|
43
flake.nix
43
flake.nix
@ -1,5 +1,9 @@
|
||||
{
|
||||
description = "A faster, persistent implementation of `direnv`'s `use_nix`, to replace the built-in one.";
|
||||
|
||||
nixConfig.extra-substituters = [ "https://cache.thalheim.io" ];
|
||||
nixConfig.extra-trusted-public-keys = [ "cache.thalheim.io-1:R7msbosLEZKrxk/lKxf9BTjOOH7Ax3H0Qj0/6wiHOgc=" ];
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
flake-parts = {
|
||||
@ -33,21 +37,32 @@
|
||||
test-runner-unstable = pkgs.callPackage ./test-runner.nix {
|
||||
nixVersion = "unstable";
|
||||
};
|
||||
};
|
||||
devShells.default = pkgs.callPackage ./shell.nix {
|
||||
packages = [ config.treefmt.build.wrapper ];
|
||||
};
|
||||
apps.test-runner = {
|
||||
type = "app";
|
||||
program = "${config.packages.test-runner}";
|
||||
};
|
||||
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 {
|
||||
packages = [ config.treefmt.build.wrapper ];
|
||||
};
|
||||
|
||||
checks =
|
||||
let
|
||||
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
|
||||
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
||||
in
|
||||
packages // devShells;
|
||||
checks =
|
||||
let
|
||||
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
|
||||
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
||||
in
|
||||
packages // devShells;
|
||||
};
|
||||
};
|
||||
flake = {
|
||||
overlays.default = final: _prev: {
|
||||
|
Loading…
Reference in New Issue
Block a user