python313Packages.publicsuffixlist: 1.0.2.20250122 -> 1.0.2.20250124 (#376319)
[NixPkgs.git] / pkgs / by-name / du / dub / package.nix
blob3f4bc2dae80eb0be32e0b4491c16c198a30caf59
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   curl,
6   ldc,
7   libevent,
8   rsync,
9 }:
11 stdenv.mkDerivation (finalAttrs: {
12   pname = "dub";
13   version = "1.38.1";
15   enableParallelBuilding = true;
17   src = fetchFromGitHub {
18     owner = "dlang";
19     repo = "dub";
20     rev = "v${finalAttrs.version}";
21     hash = "sha256-8Lr/0sx4SKwU1aNOxZArta0RXpDM+EWl29ZsPDdPWFo=";
22   };
24   postPatch = ''
25     patchShebangs test
26   '';
28   nativeBuildInputs = [
29     ldc
30     libevent
31     rsync
32   ];
33   buildInputs = [ curl ];
35   buildPhase = ''
36     runHook preBuild
38     export DMD=${ldc}/bin/ldmd2
39     ldc2 -run ./build.d
41     runHook postBuild
42   '';
44   doCheck = !stdenv.hostPlatform.isDarwin;
46   checkPhase = ''
47     runHook preCheck
49     export DUB=$NIX_BUILD_TOP/source/bin/dub
50     export PATH=$PATH:$NIX_BUILD_TOP/source/bin/
51     export DC=${lib.getExe ldc}
52     export HOME=$TMP
54     rm -rf test/issue502-root-import
55     rm test/issue674-concurrent-dub.sh
56     rm test/issue672-upgrade-optional.sh
57     rm test/issue990-download-optional-selected.sh
58     rm test/issue877-auto-fetch-package-on-run.sh
59     rm test/issue1037-better-dependency-messages.sh
60     rm test/issue1416-maven-repo-pkg-supplier.sh
61     rm test/issue1180-local-cache-broken.sh
62     rm test/issue1574-addcommand.sh
63     rm test/issue1524-maven-upgrade-dependency-tree.sh
64     rm test/issue1773-lint.sh
66     rm test/ddox.sh
67     rm test/fetchzip.sh
68     rm test/feat663-search.sh
69     rm -rf test/git-dependency
70     rm test/interactive-remove.sh
71     rm test/timeout.sh
72     rm test/version-spec.sh
73     rm test/0-init-multi.sh
74     rm test/0-init-multi-json.sh
75     rm test/4-describe-data-1-list.sh
76     rm test/4-describe-data-3-zero-delim.sh
77     rm test/4-describe-import-paths.sh
78     rm test/4-describe-string-import-paths.sh
79     rm test/4-describe-json.sh
80     rm test/5-convert-stdout.sh
81     rm test/issue1003-check-empty-ld-flags.sh
82     rm test/issue103-single-file-package.sh
83     rm test/issue1040-run-with-ver.sh
84     rm test/issue1091-bogus-rebuild.sh
85     rm test/issue1194-warn-wrong-subconfig.sh
86     rm test/issue1277.sh
87     rm test/issue1372-ignore-files-in-hidden-dirs.sh
88     rm test/issue1447-build-settings-vars.sh
89     rm test/issue1531-toolchain-requirements.sh
90     rm test/issue346-redundant-flags.sh
91     rm test/issue361-optional-deps.sh
92     rm test/issue564-invalid-upgrade-dependency.sh
93     rm test/issue586-subpack-dep.sh
94     rm test/issue616-describe-vs-generate-commands.sh
95     rm test/issue686-multiple-march.sh
96     rm test/issue813-fixed-dependency.sh
97     rm test/issue813-pure-sub-dependency.sh
98     rm test/issue820-extra-fields-after-convert.sh
99     rm test/issue923-subpackage-deps.sh
100     rm test/single-file-sdl-default-name.sh
101     rm test/subpackage-common-with-sourcefile-globbing.sh
102     rm test/issue934-path-dep.sh
103     rm -r test/issue2258-dynLib-exe-dep # requires files below
104     rm -r test/1-dynLib-simple
105     rm -r test/1-exec-simple-package-json
106     rm -r test/1-exec-simple
107     rm -r test/1-staticLib-simple
108     rm -r test/2-dynLib-dep
109     rm -r test/2-staticLib-dep
110     rm -r test/2-dynLib-with-staticLib-dep
111     rm -r test/2-sourceLib-dep/
112     rm -r test/3-copyFiles
113     rm -r test/custom-source-main-bug487
114     rm -r test/custom-unittest
115     rm -r test/issue1262-version-inheritance-diamond
116     rm -r test/issue1003-check-empty-ld-flags
117     rm -r test/ignore-hidden-1
118     rm -r test/ignore-hidden-2
119     rm -r test/issue1427-betterC
120     rm -r test/issue130-unicode-*
121     rm -r test/issue1262-version-inheritance
122     rm -r test/issue1372-ignore-files-in-hidden-dirs
123     rm -r test/issue1350-transitive-none-deps
124     rm -r test/issue1775
125     rm -r test/issue1447-build-settings-vars
126     rm -r test/issue1408-inherit-linker-files
127     rm -r test/issue1551-var-escaping
128     rm -r test/issue754-path-selection-fail
129     rm -r test/issue1788-incomplete-string-import-override
130     rm -r test/subpackage-ref
131     rm -r test/issue777-bogus-path-dependency
132     rm -r test/issue959-path-based-subpack-dep
133     rm -r test/issue97-targettype-none-nodeps
134     rm -r test/issue97-targettype-none-onerecipe
135     rm -r test/path-subpackage-ref
136     rm -r test/sdl-package-simple
137     rm -r test/dpath-variable # requires execution of dpath-variable.sh
138     rm -r test/use-c-sources
139     rm -r test/pr2642-cache-db
140     rm -r test/pr2644-describe-artifact-path
141     rm -r test/pr2647-build-deep
143     ./test/run-unittest.sh
145     runHook postCheck
146   '';
148   installPhase = ''
149     runHook preInstall
151     install -Dm755 bin/dub $out/bin/dub
153     runHook postInstall
154   '';
156   meta = with lib; {
157     description = "Package and build manager for D programs and libraries";
158     homepage = "https://code.dlang.org/";
159     license = licenses.mit;
160     mainProgram = "dub";
161     maintainers = with maintainers; [ jtbx ];
162     platforms = [
163       "x86_64-linux"
164       "i686-linux"
165       "aarch64-linux"
166       "x86_64-darwin"
167       "aarch64-darwin"
168     ];
169   };