1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 13:41:26 +00:00
nixpkgs/pkgs/tools/networking/tridactyl-native/default.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv
, fetchFromGitHub
, python3
}:
stdenv.mkDerivation rec {
pname = "tridactyl-native";
# this is actually the version of tridactyl itself; the native messenger will
# probably not change with every tridactyl version
2019-11-25 19:19:49 +00:00
version = "1.17.1";
src = fetchFromGitHub {
owner = "tridactyl";
repo = "tridactyl";
rev = version;
2019-11-25 19:19:49 +00:00
sha256 = "197vh3k9nh58djl6ph0lznkdb2schqlksxxr93xjkk4xsc7k6j1g";
};
sourceRoot = "source/native";
nativeBuildInputs = [
python3.pkgs.wrapPython
];
buildPhase = ''
sed -i -e "s|REPLACE_ME_WITH_SED|$out/share/tridactyl/native_main.py|" "tridactyl.json"
'';
installPhase = ''
mkdir -p "$out/lib/mozilla/native-messaging-hosts"
cp tridactyl.json "$out/lib/mozilla/native-messaging-hosts/"
mkdir -p "$out/share/tridactyl"
cp native_main.py "$out/share/tridactyl"
wrapPythonProgramsIn "$out/share/tridactyl"
'';
meta = with stdenv.lib; {
description = "Tridactyl native messaging host application";
homepage = https://github.com/tridactyl/tridactyl;
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ timokau ];
};
}