File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ --- a/dmd-script
2+ +++ b/dmd-script
3+ @@ -72,7 +72,7 @@ my @run_args;
4+ # for the target prefix.
5+ basename($0) =~ m/^(.*-)?g?dmd(-.*)?$/;
6+ my $target_prefix = $1?$1:"";
7+ - my $gdc_dir = abs_path(dirname($0));
8+ + my $gdc_dir = "@gdc_dir@";
9+ my $gdc = File::Spec->catfile( $gdc_dir, $target_prefix . "gdc" . ($2?$2:""));
10+
11+ sub osHasEXE() {
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ stdenvNoCC ,
4+ fetchFromGitHub ,
5+ substituteAll ,
6+ gdc ,
7+ perl ,
8+ } :
9+ stdenvNoCC . mkDerivation {
10+ pname = "gdmd" ;
11+ version = "0.1.0-unstable-2024-05-30" ;
12+
13+ src = fetchFromGitHub {
14+ owner = "D-Programming-GDC" ;
15+ repo = "gdmd" ;
16+ rev = "dc0ad9f739795f3ce5c69825efcd5d1d586bb013" ;
17+ hash = "sha256-Sw8ExEPDvGqGKcM9VKnOI6MGgXW0tAu51A90Wi4qrRE=" ;
18+ } ;
19+
20+ patches = [
21+ ( substituteAll {
22+ src = ./0001-gdc-store-path.diff ;
23+ gdc_dir = "${ gdc } /bin" ;
24+ } )
25+ ] ;
26+
27+ buildInputs = [
28+ gdc
29+ perl
30+ ] ;
31+
32+ installFlags = [
33+ "DESTDIR=$(out)"
34+ "prefix="
35+ ] ;
36+
37+ preInstall = ''
38+ install -d $out/bin $out/share/man/man1
39+ '' ;
40+
41+ meta = {
42+ description = "Wrapper for GDC that emulates DMD's command line" ;
43+ homepage = "https://gdcproject.org" ;
44+ license = lib . licenses . gpl3Plus ;
45+ platforms = lib . platforms . all ;
46+ maintainers = with lib . maintainers ; [ jtbx ] ;
47+ mainProgram = "gdmd" ;
48+ } ;
49+ }
You can’t perform that action at this time.
0 commit comments