mirror of
https://github.com/nix-community/nix-direnv.git
synced 2024-09-11 11:35:54 +03:00
set bash 4.4 as minimum
This commit is contained in:
parent
f4123add44
commit
04d6770ea7
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
|
||||||
|
|
||||||
|
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.";
|
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,21 +37,32 @@
|
|||||||
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: {
|
||||||
devShells.default = pkgs.callPackage ./shell.nix {
|
name = "bash-4.4";
|
||||||
packages = [ config.treefmt.build.wrapper ];
|
src = pkgs.fetchurl {
|
||||||
};
|
url = "https://ftp.gnu.org/gnu/bash/bash-4.4.tar.gz";
|
||||||
apps.test-runner = {
|
hash = "sha256-2GszksEgLo/1pCOzAuYoTbf49DXqnzm1sbIP06w238s=";
|
||||||
type = "app";
|
};
|
||||||
program = "${config.packages.test-runner}";
|
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 =
|
checks =
|
||||||
let
|
let
|
||||||
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
|
packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages;
|
||||||
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells;
|
||||||
in
|
in
|
||||||
packages // devShells;
|
packages // devShells;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
flake = {
|
flake = {
|
||||||
overlays.default = final: _prev: {
|
overlays.default = final: _prev: {
|
||||||
|
Loading…
Reference in New Issue
Block a user