default.nix (1147B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 pkg-config, 6 ncurses, 7 w3m, 8 ueberzug, 9 }: 10 11 stdenv.mkDerivation (finalAttrs: { 12 pname = "cfiles"; 13 version = "1.8"; 14 15 src = fetchFromGitHub { 16 owner = "mananapr"; 17 repo = "cfiles"; 18 rev = "v${finalAttrs.version}"; 19 hash = "sha256-Y5OOA0GGnjl4614zicuS00Wz2x5lLzhEHVioNFADQto="; 20 }; 21 22 postPatch = '' 23 substituteInPlace scripts/clearimg \ 24 --replace-fail "/usr/lib/w3m/w3mimgdisplay" "${w3m}/bin/w3mimgdisplay" 25 substituteInPlace scripts/displayimg \ 26 --replace-fail "/usr/lib/w3m/w3mimgdisplay" "${w3m}/bin/w3mimgdisplay" 27 substituteInPlace scripts/displayimg_uberzug \ 28 --replace-fail "ueberzug" "${ueberzug}/bin/ueberzug" 29 ''; 30 31 nativeBuildInputs = [ pkg-config ]; 32 buildInputs = [ 33 ncurses 34 w3m 35 ueberzug 36 ]; 37 38 makeFlags = [ "CC:=$(CC)" ]; 39 40 installFlags = [ "prefix=$(out)" ]; 41 42 meta = { 43 description = "A ncurses file manager written in C with vim like keybindings"; 44 homepage = "https://github.com/mananapr/cfiles"; 45 license = lib.licenses.mit; 46 maintainers = [ lib.maintainers.sikmir ]; 47 platforms = lib.platforms.unix; 48 }; 49 })