nixpkgs/pkgs/tools/networking/tridactyl-native/default.nix
R. RyanTM a1961db5f8 tridactyl-native: 1.14.9 -> 1.15.0
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/tridactyl-native/versions
2019-06-01 08:17:44 -07:00

44 lines
1.1 KiB
Nix

{ 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
version = "1.15.0";
src = fetchFromGitHub {
owner = "tridactyl";
repo = "tridactyl";
rev = version;
sha256 = "12pq95pw5g777kpgad04n9az1fl8y0x1vismz81mqqij3jr5qwzb";
};
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 ];
};
}