Merge pull request #221018 from DamienCassou/offpunk-1.9.2

authored by Damien Cassou and committed by GitHub ac718d02 a8661014

+15 -23
+15 -23
pkgs/applications/networking/browsers/offpunk/default.nix
··· 3 3 installShellFiles, 4 4 less, 5 5 lib, 6 - makeWrapper, 7 6 offpunk, 8 - python3, 9 - stdenv, 7 + python3Packages, 10 8 testers, 11 9 timg, 12 10 xdg-utils, ··· 14 12 }: 15 13 16 14 let 17 - pythonDependencies = with python3.pkgs; [ 15 + pythonDependencies = with python3Packages; [ 18 16 beautifulsoup4 19 17 cryptography 20 18 feedparser ··· 30 28 xsel 31 29 ]; 32 30 in 33 - stdenv.mkDerivation (finalAttrs: { 31 + python3Packages.buildPythonPackage rec { 34 32 pname = "offpunk"; 35 - version = "1.9"; 33 + version = "1.9.2"; 34 + format = "flit"; 35 + 36 + disabled = python3Packages.pythonOlder "3.7"; 36 37 37 38 src = fetchFromSourcehut { 38 39 owner = "~lioploum"; 39 40 repo = "offpunk"; 40 - rev = "v${finalAttrs.version}"; 41 - sha256 = "sha256-sxX4/7jbNbLwHVfE1lDtjr/luby5zAf6Hy1RcwXZLBA="; 41 + rev = "v${version}"; 42 + sha256 = "sha256-CYsuoj5/BaaboDRtcOrGzJoZDCfOLs7ROVWLVjOAnRU="; 42 43 }; 43 44 44 - nativeBuildInputs = [ makeWrapper installShellFiles ]; 45 - buildInputs = otherDependencies ++ pythonDependencies; 46 - 47 - installPhase = '' 48 - runHook preInstall 49 - 50 - install -D ./offpunk.py $out/bin/offpunk 45 + nativeBuildInputs = [ installShellFiles ]; 46 + propagatedBuildInputs = otherDependencies ++ pythonDependencies; 51 47 52 - wrapProgram $out/bin/offpunk \ 53 - --set PYTHONPATH "$PYTHONPATH" \ 54 - --set PATH ${lib.makeBinPath otherDependencies} 55 - 56 - installManPage man/*.1 57 - runHook postInstall 48 + postInstall = '' 49 + installManPage man/*.1 58 50 ''; 59 51 60 52 passthru.tests.version = testers.testVersion { package = offpunk; }; 61 53 62 54 meta = with lib; { 63 55 description = "An Offline-First browser for the smolnet "; 64 - homepage = finalAttrs.src.meta.homepage; 56 + homepage = src.meta.homepage; 65 57 maintainers = with maintainers; [ DamienCassou ]; 66 58 platforms = platforms.linux; 67 59 license = licenses.bsd2; 68 60 }; 69 - }) 61 + }