summary refs log tree commit diff
diff options
context:
space:
mode:
authorkilianar <mail@kilianar.de>2022-07-09 18:08:52 +0200
committerkilianar <mail@kilianar.de>2022-07-09 18:30:36 +0200
commit7d69cd5908e92862e449b53509e0d3b9bd07b3b8 (patch)
tree551090806d319ebda4d1477ca95dfa0db8591614
parent37d847197431b24bd2183627850916c5cb842005 (diff)
downloadnixpkgs-7d69cd5908e92862e449b53509e0d3b9bd07b3b8.tar
nixpkgs-7d69cd5908e92862e449b53509e0d3b9bd07b3b8.tar.gz
nixpkgs-7d69cd5908e92862e449b53509e0d3b9bd07b3b8.tar.bz2
nixpkgs-7d69cd5908e92862e449b53509e0d3b9bd07b3b8.tar.lz
nixpkgs-7d69cd5908e92862e449b53509e0d3b9bd07b3b8.tar.xz
nixpkgs-7d69cd5908e92862e449b53509e0d3b9bd07b3b8.tar.zst
nixpkgs-7d69cd5908e92862e449b53509e0d3b9bd07b3b8.zip
feh: 3.8 -> 3.9
Includes some refactoring:
- fetchFromGitHub instead of fetchurl
- add patch to fix the failing tests
-rw-r--r--pkgs/applications/graphics/feh/default.nix22
1 files changed, 16 insertions, 6 deletions
diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix
index 9c75742d52b..3865848ff20 100644
--- a/pkgs/applications/graphics/feh/default.nix
+++ b/pkgs/applications/graphics/feh/default.nix
@@ -1,17 +1,27 @@
-{ lib, stdenv, fetchurl, makeWrapper
-, xorg, imlib2, libjpeg, libpng
+{ lib, stdenv, fetchFromGitHub, makeWrapper
+, xorg, imlib2, libjpeg, libpng, fetchpatch
 , curl, libexif, jpegexiforient, perl
 , enableAutoreload ? !stdenv.hostPlatform.isDarwin }:
 
 stdenv.mkDerivation rec {
   pname = "feh";
-  version = "3.8";
+  version = "3.9";
 
-  src = fetchurl {
-    url = "https://feh.finalrewind.org/${pname}-${version}.tar.bz2";
-    sha256 = "1a9bsq5j9sl2drzkab0hdhnamalpaszw9mz2prz6scrr5dak8g3z";
+  src = fetchFromGitHub {
+    owner = "derf";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-rgNC4M1TJ5EPeWmVHVzgaxTGLY7CYQf7uOsOn5bkwKE=";
   };
 
+  patches = [
+    # fix test failure when magic=0 is set
+    (fetchpatch {
+      url = "https://github.com/derf/feh/commit/3c1076b31e2e4e3429a5c3d334d555e549fb72d2.patch";
+      sha256 = "sha256-F9N+N/BAeclyPHQYlO9ZV1U8S1VWfHl/8dMKUqA7DF8=";
+    })
+  ];
+
   outputs = [ "out" "man" "doc" ];
 
   nativeBuildInputs = [ makeWrapper xorg.libXt ];