mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Merge pull request #450 from nix-community/bash44
set bash 4.4 as minimum
This commit is contained in:
commit
943716adb5
3 changed files with 32 additions and 17 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
|
@ -13,7 +13,7 @@ jobs:
|
||||||
os: [ ubuntu-latest ]
|
os: [ ubuntu-latest ]
|
||||||
# FIXME macos garbage currently collect also nix-shell that runs the test
|
# FIXME macos garbage currently collect also nix-shell that runs the test
|
||||||
#os: [ ubuntu-latest, macos-latest ]
|
#os: [ ubuntu-latest, macos-latest ]
|
||||||
nix: [ stable, unstable ]
|
variants: [ stable, unstable, bash4 ]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -23,4 +23,4 @@ jobs:
|
||||||
extra_nix_config: |
|
extra_nix_config: |
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
- run:
|
- 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
|
NIX_DIRENV_VERSION=3.0.1
|
||||||
|
|
||||||
# min required versions
|
# min required versions
|
||||||
BASH_MIN_VERSION=5.2
|
BASH_MIN_VERSION=4.4
|
||||||
DIRENV_MIN_VERSION=2.21.3
|
DIRENV_MIN_VERSION=2.21.3
|
||||||
NIX_MIN_VERSION=2.4
|
NIX_MIN_VERSION=2.4
|
||||||
|
|
||||||
|
|
|
||||||
23
flake.nix
23
flake.nix
|
|
@ -1,5 +1,9 @@
|
||||||
{
|
{
|
||||||
description = "A faster, persistent implementation of `direnv`'s `use_nix`, to replace the built-in one.";
|
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 = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
flake-parts = {
|
flake-parts = {
|
||||||
|
|
@ -33,14 +37,24 @@
|
||||||
test-runner-unstable = pkgs.callPackage ./test-runner.nix {
|
test-runner-unstable = pkgs.callPackage ./test-runner.nix {
|
||||||
nixVersion = "unstable";
|
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 {
|
devShells.default = pkgs.callPackage ./shell.nix {
|
||||||
packages = [ config.treefmt.build.wrapper ];
|
packages = [ config.treefmt.build.wrapper ];
|
||||||
};
|
};
|
||||||
apps.test-runner = {
|
|
||||||
type = "app";
|
|
||||||
program = "${config.packages.test-runner}";
|
|
||||||
};
|
|
||||||
|
|
||||||
checks =
|
checks =
|
||||||
let
|
let
|
||||||
|
|
@ -49,6 +63,7 @@
|
||||||
in
|
in
|
||||||
packages // devShells;
|
packages // devShells;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
flake = {
|
flake = {
|
||||||
overlays.default = final: _prev: {
|
overlays.default = final: _prev: {
|
||||||
nix-direnv = final.callPackage ./default.nix { };
|
nix-direnv = final.callPackage ./default.nix { };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue