default.nix (757B)
1 { 2 lib, 3 stdenv, 4 fetchurl, 5 }: 6 7 stdenv.mkDerivation (finalAttrs: { 8 pname = "imgdecode"; 9 version = "1.1"; 10 11 src = fetchurl { 12 url = "mirror://sourceforge/garmin-img/imgdecode-${finalAttrs.version}.tar.gz"; 13 hash = "sha256-VQC9o/QOti6jTCYi4ktH6UKZLPLwLOUAfosZftf+uWc="; 14 }; 15 16 postPatch = '' 17 substituteInPlace garminimg.cc \ 18 --replace-fail "<stdio.h>" "<cstring>" 19 ''; 20 21 configurePhase = "./configure || true"; 22 23 installPhase = "install -Dm755 imgdecode -t $out/bin"; 24 25 meta = { 26 description = "IMG Decoder"; 27 homepage = "https://sourceforge.net/projects/garmin-img/"; 28 license = lib.licenses.bsd3; 29 maintainers = [ lib.maintainers.sikmir ]; 30 platforms = lib.platforms.linux; 31 skip.ci = stdenv.isDarwin; 32 }; 33 })