bin.nix (1334B)
1 { 2 lib, 3 stdenv, 4 fetchfromgh, 5 undmg, 6 python3Packages, 7 qutebrowser, 8 }: 9 10 stdenv.mkDerivation (finalAttrs: { 11 pname = "qutebrowser-bin"; 12 version = "3.3.1"; 13 14 src = fetchfromgh { 15 owner = "qutebrowser"; 16 repo = "qutebrowser"; 17 name = "qutebrowser-${finalAttrs.version}-x86_64.dmg"; 18 hash = "sha256-cxEmAGl3E05SgfWrwCUTEnAirnrKksz1yMK0h2g/idQ="; 19 version = "v${finalAttrs.version}"; 20 }; 21 22 sourceRoot = "."; 23 24 nativeBuildInputs = [ 25 undmg 26 python3Packages.wrapPython 27 ]; 28 29 installPhase = '' 30 runHook preInstall 31 32 mkdir -p $out/Applications 33 cp -r *.app $out/Applications 34 35 runHook postInstall 36 ''; 37 38 postInstall = '' 39 tar -C $out/Applications/qutebrowser.app/Contents/Resources \ 40 --strip-components=2 -xvzf ${qutebrowser.src} \ 41 qutebrowser-${qutebrowser.version}/misc/userscripts/qute-pass 42 43 buildPythonPath ${python3Packages.tldextract}; 44 patchPythonScript $out/Applications/qutebrowser.app/Contents/Resources/userscripts/qute-pass 45 ''; 46 47 passthru.userscripts = "${finalAttrs.finalPackage}/Applications/qutebrowser.app/Contents/Resources/userscripts"; 48 49 meta = qutebrowser.meta // { 50 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 51 maintainers = [ lib.maintainers.sikmir ]; 52 platforms = [ "x86_64-darwin" ]; 53 skip.ci = true; 54 }; 55 })