Skip to content

Commit

Permalink
Attempted repro for #24 with Bash 5.1
Browse files Browse the repository at this point in the history
Couldn't reproduce so far
  • Loading branch information
tesujimath committed Aug 20, 2024
1 parent 3b91c96 commit a0a71b7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
19 changes: 18 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 19 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,35 @@
description = "Development environment for nu_plugin_bash_env.";

inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable;
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=bash
nixpkgs_bash51.url = "github:NixOS/nixpkgs?rev=79b3d4bcae8c7007c9fd51c279a8a67acfa73a2a";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, nixpkgs_bash51, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
};
nu_plugin_bash_env = pkgs.writeShellScriptBin "nu_plugin_bash_env"
(builtins.replaceStrings ["jq" "(cat)" " sed "] ["${pkgs.jq}/bin/jq" "(${pkgs.coreutils}/bin/cat)" " ${pkgs.gnused}/bin/sed "]
pkgs_bash51 = import nixpkgs_bash51 {
inherit system;
};
nu_plugin_bash_env = pkgs_bash51.writeShellScriptBin "nu_plugin_bash_env"
(builtins.replaceStrings [ "jq" "(cat)" " sed " ] [ "${pkgs.jq}/bin/jq" "(${pkgs.coreutils}/bin/cat)" " ${pkgs.gnused}/bin/sed " ]
(builtins.readFile ./nu_plugin_bash_env));
in
with pkgs;
{
devShells.default = mkShell {
nativeBuildInputs = [
bashInteractive
jq
];
};
packages.default = nu_plugin_bash_env;
}
with pkgs;
{
devShells.default = mkShell {
nativeBuildInputs = [
pkgs_bash51.bashInteractive
jq
];
};
packages.default = nu_plugin_bash_env;
}
);
}

0 comments on commit a0a71b7

Please sign in to comment.