biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / misc / abduco / default.nix
blobeef5fe0df344d6579504485403bfce8982cf6c25
1 { lib, stdenv, fetchpatch, fetchzip, writeText, conf ? null }:
3 let
4   rev = "8c32909a159aaa9484c82b71f05b7a73321eb491";
5 in
6 stdenv.mkDerivation {
7   pname = "abduco";
8   version = "unstable-2020-04-30";
10   src = fetchzip {
11     urls = [
12       "https://github.com/martanne/abduco/archive/${rev}.tar.gz"
13       "https://git.sr.ht/~martanne/abduco/archive/${rev}.tar.gz"
14     ];
15     hash = "sha256-o7SPK/G31cW/rrLwV3UJOTq6EBHl6AEE/GdeKGlHdyg=";
16   };
18   preBuild = lib.optionalString (conf != null)
19     "cp ${writeText "config.def.h" conf} config.def.h";
21   installFlags = [ "install-completion" ];
22   CFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-D_DARWIN_C_SOURCE";
24   patches = [
25     # https://github.com/martanne/abduco/pull/22
26     (fetchpatch {
27       name = "use-XDG-directory-scheme-by-default";
28       url = "https://github.com/martanne/abduco/commit/0e9a00312ac9777edcb169122144762e3611287b.patch";
29       sha256 = "sha256-4NkIflbRkUpS5XTM/fxBaELpvlZ4S5lecRa8jk0XC9g=";
30     })
32     # “fix bug where attaching to dead session won't give underlying exit code”
33     # https://github.com/martanne/abduco/pull/45
34     (fetchpatch {
35       name = "exit-code-when-attaching-to-dead-session";
36       url = "https://github.com/martanne/abduco/commit/972ca8ab949ee342569dbd66b47cc4a17b28247b.patch";
37       sha256 = "sha256-8hios0iKYDOmt6Bi5NNM9elTflGudnG2xgPF1pSkHI0=";
38     })
40     # “report pixel sizes to child processes that use ioctl(0, TIOCGWINSZ, ...)”
41     # used for kitty & other terminals that display images
42     # https://github.com/martanne/abduco/pull/62
43     (fetchpatch {
44       name = "report-pixel-sizes-to-child-processes";
45       url = "https://github.com/martanne/abduco/commit/a1e222308119b3251f00b42e1ddff74a385d4249.patch";
46       sha256 = "sha256-eiF0A4IqJrrvXxjBYtltuVNpxQDv/iQPO+K7Y8hWBGg=";
47     })
48   ];
50   meta = with lib; {
51     homepage = "http://brain-dump.org/projects/abduco";
52     license = licenses.isc;
53     description = "Allows programs to be run independently from its controlling terminal";
54     maintainers = with maintainers; [ pSub ];
55     platforms = platforms.unix;
56     mainProgram = "abduco";
57   };