1 {stdenv, lib, fetchurl, dub, ncurses, ldc, zlib, removeReferencesTo }:
4 _d_ae_ver = "0.0.3184";
5 _d_btrfs_ver = "0.0.12";
6 _d_ncurses_ver = "0.0.149";
7 _d_emsi_containers_ver = "0.9.0";
9 stdenv.mkDerivation rec {
15 url = "https://github.com/CyberShadow/${pname}/archive/v${version}.tar.gz";
16 sha256 = "265c63ee82067f6b5dc44b47c9ec58be5e13c654f31035c60a7e375ffa4082c9";
19 url = "https://github.com/CyberShadow/ae/archive/v${_d_ae_ver}.tar.gz";
20 sha256 = "74c17146ecde7ec4ba159eae4f88c74a5ef40cc200eabf97a0648f5abb5fde5e";
23 url = "https://github.com/CyberShadow/d-btrfs/archive/v${_d_btrfs_ver}.tar.gz";
24 sha256 = "cf2b1fa3e94a0aa239d465adbac239514838835283521d632f571948aa517f92";
27 url = "https://github.com/D-Programming-Deimos/ncurses/archive/v${_d_ncurses_ver}.tar.gz";
28 sha256 = "2c8497f5dd93f9d3a05ca7ed57c4fcaee1e988fd25a24de106917ddf72f34646";
31 url = "https://github.com/dlang-community/containers/archive/v${_d_emsi_containers_ver}.tar.gz";
32 sha256 = "5e256b84bbdbd2bd625cba0472ea27a1fde6d673d37a85fe971a20d52874acaa";
39 mv ae-${_d_ae_ver} "ae"
43 nativeBuildInputs = [ dub ldc ];
44 buildInputs = [ ncurses zlib ];
49 HOME="home" dub add-local ae ${_d_ae_ver}
50 HOME="home" dub add-local d-btrfs-${_d_btrfs_ver} ${_d_btrfs_ver}
51 HOME="home" dub add-local ncurses-${_d_ncurses_ver} ${_d_ncurses_ver}
52 HOME="home" dub add-local containers-${_d_emsi_containers_ver} ${_d_emsi_containers_ver}
58 cd ${pname}-${version}
59 HOME="../home" dub --skip-registry=all build -b release
71 ${removeReferencesTo}/bin/remove-references-to -t ${ldc} $out/bin/btdu
74 passthru.updateScript = ./update.py;
77 description = "Sampling disk usage profiler for btrfs";
78 homepage = "https://github.com/CyberShadow/btdu";
79 license = licenses.gpl2Only;
80 platforms = platforms.linux;
81 maintainers = with maintainers; [ atila ];