abduco: fix version, use hash and configureFlags

+8 -6
+8 -6
pkgs/by-name/ab/abduco/package.nix
··· 9 9 10 10 let 11 11 rev = "8c32909a159aaa9484c82b71f05b7a73321eb491"; 12 + defaultUserConfig = writeText "config.def.h" conf; 12 13 in 13 14 stdenv.mkDerivation { 14 15 pname = "abduco"; 15 - version = "unstable-2020-04-30"; 16 + version = "0.6.0-unstable-2020-04-30"; 16 17 17 18 src = fetchzip { 18 19 urls = [ ··· 22 23 hash = "sha256-o7SPK/G31cW/rrLwV3UJOTq6EBHl6AEE/GdeKGlHdyg="; 23 24 }; 24 25 25 - preBuild = lib.optionalString (conf != null) "cp ${writeText "config.def.h" conf} config.def.h"; 26 + configureFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-D_DARWIN_C_SOURCE" ]; 27 + 28 + preBuild = lib.optionalString (conf != null) "cp ${defaultUserConfig} config.def.h"; 26 29 27 30 installFlags = [ "install-completion" ]; 28 - CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE"; 29 31 30 32 patches = [ 31 33 # https://github.com/martanne/abduco/pull/22 32 34 (fetchpatch { 33 35 name = "use-XDG-directory-scheme-by-default"; 34 36 url = "https://github.com/martanne/abduco/commit/0e9a00312ac9777edcb169122144762e3611287b.patch"; 35 - sha256 = "sha256-4NkIflbRkUpS5XTM/fxBaELpvlZ4S5lecRa8jk0XC9g="; 37 + hash = "sha256-4NkIflbRkUpS5XTM/fxBaELpvlZ4S5lecRa8jk0XC9g="; 36 38 }) 37 39 38 40 # “fix bug where attaching to dead session won't give underlying exit code” ··· 40 42 (fetchpatch { 41 43 name = "exit-code-when-attaching-to-dead-session"; 42 44 url = "https://github.com/martanne/abduco/commit/972ca8ab949ee342569dbd66b47cc4a17b28247b.patch"; 43 - sha256 = "sha256-8hios0iKYDOmt6Bi5NNM9elTflGudnG2xgPF1pSkHI0="; 45 + hash = "sha256-8hios0iKYDOmt6Bi5NNM9elTflGudnG2xgPF1pSkHI0="; 44 46 }) 45 47 46 48 # “report pixel sizes to child processes that use ioctl(0, TIOCGWINSZ, ...)” ··· 49 51 (fetchpatch { 50 52 name = "report-pixel-sizes-to-child-processes"; 51 53 url = "https://github.com/martanne/abduco/commit/a1e222308119b3251f00b42e1ddff74a385d4249.patch"; 52 - sha256 = "sha256-eiF0A4IqJrrvXxjBYtltuVNpxQDv/iQPO+K7Y8hWBGg="; 54 + hash = "sha256-eiF0A4IqJrrvXxjBYtltuVNpxQDv/iQPO+K7Y8hWBGg="; 53 55 }) 54 56 ]; 55 57