summary refs log tree commit diff
path: root/pkgs/shells/fish/plugins/foreign-env/default.nix
blob: d0b5b77a03b1cc9f762424114b4b08d67d0e6775 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, buildFishPlugin, fetchFromGitHub, gnused, bash, coreutils }:

buildFishPlugin {
  pname = "foreign-env";
  version = "unstable-2020-02-09";

  src = fetchFromGitHub {
    owner = "oh-my-fish";
    repo = "plugin-foreign-env";
    rev = "dddd9213272a0ab848d474d0cbde12ad034e65bc";
    sha256 = "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs";
  };

  patches = [ ./suppress-harmless-warnings.patch ];

  preInstall = ''
    sed -e "s|sed|${gnused}/bin/sed|" \
        -e "s|bash|${bash}/bin/bash|" \
        -e "s|\| tr|\| ${coreutils}/bin/tr|" \
        -i functions/*
  '';

  meta = with lib; {
    description = "A foreign environment interface for Fish shell";
    license = licenses.mit;
    maintainers = with maintainers; [ jgillich ];
    platforms = with platforms; unix;
  };
}