aboutsummaryrefslogtreecommitdiffhomepage
path: root/nix-overlays/README
blob: 44e15852010875c2bca83af75ae9f08079bbd69e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
-*- mode: org -*-
#+TITLE:       D related overlays
#+DESCRIPTION: ldc, dub, dtools: dlang compiler build tool and tools
#+FILETAGS:    :dlang:build:tools:
#+AUTHOR:      Ralph Amissah
#+EMAIL:       [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
#+COPYRIGHT:   Copyright (C) 2015 - 2023 Ralph Amissah
#+LANGUAGE:    en
#+STARTUP:     content hideblocks hidestars noindent entitiespretty
#+OPTIONS:     H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t
#+PROPERTY:    header-args  :exports code
#+PROPERTY:    header-args+ :noweb yes
#+PROPERTY:    header-args+ :eval no
#+PROPERTY:    header-args+ :results no
#+PROPERTY:    header-args+ :cache no
#+PROPERTY:    header-args+ :padline no

* README for D related overlays
** dlang-nix-overlays

Nix build overlays for building and testing more recent versions of the dlang
compiler and build tools: ldc, dub and dtools, than exist in nixpkgs at the time
of publishing, in some cases with additional fixes.

nix overlays for (updates nixpkgs, more recent versions of):
  - ldc     ( 1.30.0 -> 1.32.2 )
  - dub     ( 1.23.0 -> 1.33.1 ) [for nix versions 1.31.0 ... 1.33.0 broken]
  - dtools  ( 2.095.1 -> 2.103.1 )

  - dmd     ( 2.100.2 -> 2.104.0 ) KO ✗
  - gdc     [not yet available]

(updates nixpkgs circa 2023-05-12)

dlang-nix-flakes.org --❯
  .
  └── nix-overlays
      ├── dmd
      │   ├── binary.nix
      │   ├── bootstrap.nix
      │   ├── default.nix
      │   └── generic.nix
      ├── dtools
      │   └── default.nix
      ├── dub
      │   └── default.nix
      ├── ldc
      │   ├── binary.nix
      │   ├── bootstrap.nix
      │   ├── default.nix
      │   └── generic.nix
      └── README

search nixpkgs here:

- https://search.nixos.org/packages?channel=unstable&from=0&size=100&sort=relevance&query=

** compilers
*** ldc OK ✓ ( 1.30.0 -> 1.32.2 )

- https://wiki.dlang.org/LDC

- https://github.com/ldc-developers/ldc
  - https://github.com/ldc-developers/ldc/releases
    nix-prefetch-url --unpack https://github.com/ldc-developers/ldc/archive/refs/tags/v1.32.2.tar.gz
  - https://github.com/ldc-developers/ldc/issues

- version in nixpkgs:
  - https://search.nixos.org/packages?channel=unstable&show=ldc&from=0&size=100&sort=relevance&type=packages&query=ldc

*** dmd KO ✗ ( 2.100.2 -> 2.104.0 )

- https://dlang.org/
  - https://wiki.dlang.org/LDC

- https://github.com/dlang/dmd
  - https://github.com/dlang/dmd/tags
    nix-prefetch-url --unpack https://github.com/dlang/dmd/archive/refs/tags/v2.104.0.tar.gz
  - https://github.com/dlang/dmd/pulls

- version in nixpkgs:
  - https://search.nixos.org/packages?channel=unstable&show=dmd&from=0&size=100&sort=relevance&type=packages&query=dmd

- dmd nixpkg modified and appears to build ok, but it appears my overlay does
  not get things right REVIEW

- dmd on nixos FAILS to build (my working projects), appears not to find parts
  of itself

*** gdc ( not provided yet with gcc12 in nixpkgs )

not yet provided in nixpkgs with gcc12, no attempt made

- https://wiki.dlang.org/GDC
  - https://wiki.dlang.org/GDC_Development

- https://github.com/D-Programming-GDC/gdc

** build tool
*** dub ( 1.23.0 -> 1.33.1 )

- https://code.dlang.org/packages/dub

- https://github.com/dlang/dub
  - https://github.com/dlang/dub/releases
    nix-prefetch-url --unpack https://github.com/dlang/dub/archive/refs/tags/v1.33.1.tar.gz
  - https://github.com/dlang/dub/issues

- version in nixpkgs:
  - https://search.nixos.org/packages?channel=unstable&show=dub&from=0&size=100&sort=relevance&type=packages&query=dub

- dub nixpkg overlay is updated and runs most dub tests correctly

- dub OK ✓ ( 1.30.0 -> 1.33.1 )

  from v1.31.0 requires seeting of pwd in buildPhase else fails to build
  packages with nix tools that previous version of dub built;

** tools
*** dtools OK ✓ ( 2.095.1 -> 2.103.1 )

- https://code.dlang.org/packages/dtools

- https://github.com/dlang/tools
  - https://github.com/dlang/tools/tags
    nix-prefetch --unpack https://github.com/dlang/tools/archive/refs/tags/v2.103.1.tar.gz
  - https://github.com/dlang/tools/issues

- version in nixpkgs
  - https://search.nixos.org/packages?channel=unstable&show=dtools&from=0&size=100&sort=relevance&type=packages&query=dtools

** nixpkgs

It is possible to work directly against a local copy of nixpkgs. To do so you
would clone nixpkgs and point to the local nixpkgs as your build source.

git clone --depth=1 --branch master https://github.com/nixos/nixpkgs nixpkgs

- ./nixpkgs/pkgs/development/compilers/ldc
- ./nixpkgs/pkgs/development/compilers/dmd
- ./nixpkgs/pkgs/development/tools/build-managers/dub
- ./nixpkgs/pkgs/development/tools/dtools

- ./nixpkgs/pkgs/development/compilers/gcc

Note the overlays if copied to the nixpkgs path locations should work as they do
in the overlay, with a pointer to the cloned nixpkgs as nixpkgs repository
source. In fact the starting point for the overlays was to take verbatim what
was in nixpkgs and then to update and fix where necessary those packages.

It is possible to compare the changes made by the overlays here directly against
what is currently available in nixpkgs.

- https://search.nixos.org/packages?channel=unstable&size=100&sort=relevance&query=

nix flake update && nix flake check --show-trace && nix flake info && echo "" && nix flake show