Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e415919
feat(scripts/dump_dlang_pkgs.d): Download and dump dlang package data…
monyarm Apr 14, 2024
f89eee8
feat(scripts/dump_dlang_pkgs.d): Generated nix expressions
monyarm Apr 14, 2024
0a47897
feat(gh-actions/update-dub-deb): Run update-dub-db weekly
monyarm Apr 14, 2024
c81e863
doc(buildDubPackage): Document usage.
monyarm Apr 14, 2024
bd5003b
feat(build-dub-package): buildDubPackage function (supports dub.selec…
monyarm Apr 14, 2024
697a1d1
feat(pkgs/dub): version 1.31.0
monyarm Apr 14, 2024
15a25c3
feat(pkgs/d-scanner): Add d-scanner package
monyarm Apr 14, 2024
e4ab445
feat(pkgs/serve-d): Add serve-d package
monyarm Apr 14, 2024
a1bd428
feat(pkgs/tsv-utils): Add tsv-utils package
monyarm Apr 14, 2024
cbca6f1
feat(pkgs/dlangide): Added dlangide
monyarm Apr 14, 2024
692f50f
feat(pkgs/inochi2d): Added inochi2d
monyarm Apr 14, 2024
7c78d40
feat(pkgs/graphqld): Added graphqld
monyarm Apr 14, 2024
0153ac2
feat(pkgs/dubproxy): Added dubproxy
monyarm Apr 14, 2024
cc83904
feat(pkgs/faked): Added faked
monyarm Apr 14, 2024
8b8f058
feat(pkgs/juliad): Added juliad
monyarm Apr 14, 2024
ebc03d1
feat(pkgs/libbetterc): Added libbetterc
monyarm Apr 14, 2024
3296d24
feat(pkgs/symmetry-gelf): Added symmetry-gelf
monyarm Apr 14, 2024
3b59a0b
feat(pkgs/xlsxreader): Added xlsxreader
monyarm Apr 14, 2024
71437bd
feat(pkgs/mir-algorithm): Added mir-algorithm
monyarm Apr 14, 2024
af5ab9a
feat(pkgs/mir-optim): Added mir-optim
monyarm Apr 14, 2024
e01031d
feat(pkgs/dpp): Added dpp
monyarm Apr 14, 2024
fe2f129
feat(pkgs/lubeck): Added lubeck
monyarm Apr 14, 2024
f5fcecb
refactor(build-dub-package): Fix capitalization on dontDubTest
monyarm Apr 14, 2024
e4f9c73
feat(pkgs/dust-mite): Added dust-mite
monyarm Apr 14, 2024
83d29a1
feat(pkgs/concurrency): Added concurrency
monyarm Apr 14, 2024
f118c7f
feat(pkgs/arsd): Added arsd
monyarm Apr 14, 2024
0cc353e
ci(pkgs): Fix build of dub packages in ci
monyarm Apr 14, 2024
b524053
fix(build-dub-package): add dummy build status
monyarm Apr 14, 2024
40bcbe9
fix(dubproxy): update hash
monyarm Apr 14, 2024
ec40065
fix(build-dub-package): fix dummy build status
monyarm Apr 14, 2024
9cb062b
fix(ci): fix continue-on-error
monyarm Apr 14, 2024
062d517
refactor(examples): Petar's request
monyarm Apr 14, 2024
b9423ff
fix(build-dub-package): readd dmd
monyarm Apr 15, 2024
8269cfb
fix(build-dub-package): readd dmd
monyarm Apr 15, 2024
7f59b40
feat(pkgs/dcd): Add dcd package
monyarm Apr 15, 2024
0ad2884
fix(build-dub-package): fix capitalization of dontDubInstall
monyarm Apr 15, 2024
3fb5120
feat(pkgs/dcd): Fix build
monyarm Apr 15, 2024
0c65462
feat(pkgs/dcd): Fix build
monyarm Apr 15, 2024
b1d6481
feat(pkgs/dcd): Fix build
monyarm Apr 15, 2024
5c73cde
refactor - buildDubPackage in legacyPackages
monyarm Apr 16, 2024
ebab70f
add build folder to dub-install-hook
monyarm Apr 16, 2024
08a8fd1
reorder install order
monyarm Apr 16, 2024
dab4c19
update packages
monyarm Apr 25, 2024
23457fb
dmd under darwin
monyarm Jun 20, 2024
6574bac
dmd aarch64-darwin
monyarm Jun 20, 2024
2f5b310
dmd aarch64-apple-darwin
monyarm Jun 20, 2024
cd31e9b
dmd aarch64-apple-darwin
monyarm Jun 20, 2024
9a0141d
compiler choice
monyarm Jun 20, 2024
5243df4
wip
monyarm Jun 20, 2024
5e185b6
wip
monyarm Jun 20, 2024
7c40e16
wip
monyarm Jun 20, 2024
696c9cd
wip
monyarm Jun 21, 2024
4b54db5
wip
monyarm Jun 22, 2024
4337a59
ldc-binary 1.38.0
monyarm Jun 22, 2024
21b1b3b
wip
monyarm Jun 22, 2024
ab6b8f7
update pkgs and fix serve-d and dcd
monyarm Apr 7, 2025
6709418
commit
monyarm Apr 10, 2025
e7c6c25
commit
monyarm Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

name: ${{ matrix.package }} | ${{ matrix.system }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allowedToFail }}
continue-on-error: ${{ matrix.allowedToFail == '' && false || matrix.allowedToFail }}

steps:
- uses: actions/checkout@v4
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/update-dub-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Update Dub Package Database"

on:
# Enable option to manually run the action:
workflow_dispatch:

# Run every Sunday at 00:00:
schedule:
- cron: 0 0 * * 0

jobs:
main:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Run `dump_dlang_pkgs.d`
id: update-lockfile
run: COMMIT_MSG=$(./scripts/commit_flake_update.bash | tee /dev/tty))

- uses: tibdex/[email protected]
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.generate-token.outputs.token }}
title: 'Update Dub Package Database'
commit-message: ${{ env.COMMIT_MSG }}
branch: 'create-pull-request/update-dub-package-database'
delete-branch: true
branch-suffix: timestamp
add-paths: flake.lock
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ bin/

# Dotenv
.env

# Misc
pkgs/build-dub-package/packages.json
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,22 @@ one of the differences how things are usually done with and without flakes,
even when it's possible to either pin or to not pin the nixpkgs version
regardless of flake use.

## buildDubPackage

The buildDubPackage function can be used to build software which uses dub for dependency management.

Flags can be supplied to dub using dubFlags, dubTestFlags and dubBuildFlags. dubFlags are added to both build and test.

Unittests are run by default, but can be disabled by `dontDubTest = true;`.

buildDubPackage resolves dependencies using dub.selections.json. If the package repository doesn't contain a dub.selections.json file, it must be supplied through `dubSelections`.

Specific dub/ldc versions can be supplied by using override.

If any files other then the main executable need to installed, they can be supplied through the array `extraFiles`.



## Source and binary variants

DMD and LDC packages come in two variants: `binary` and `source`.
Expand Down
27 changes: 27 additions & 0 deletions examples/dub-pkgs/arsd/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
}:
buildDubPackage rec {
pname = "arsd";
version = "unstable-2024-03-21";

src = fetchFromGitHub {
owner = "adamdruppe";
repo = "arsd";
rev = "01c7b280adf5120d77640f217ab9afaa5d76d21a";
hash = "sha256-S4X+3BN53St14qktBbQQuWIwhvmEEjTrloM2yIQdsRs=";
};

dubSelections = ./dub.selections.json;

meta = with lib; {
description = "This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo";
homepage = "https://github.com/adamdruppe/arsd";
# license = licenses.unfree; # FIXME: nix-init did not found a license
maintainers = with maintainers; [];
mainProgram = "arsd";
platforms = platforms.all;
};
}
4 changes: 4 additions & 0 deletions examples/dub-pkgs/arsd/dub.selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"fileVersion": 1,
"versions": {}
}
25 changes: 25 additions & 0 deletions examples/dub-pkgs/concurrency/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
}:
buildDubPackage rec {
pname = "concurrency";
version = "5.0.5";

src = fetchFromGitHub {
owner = "symmetryinvestments";
repo = "concurrency";
rev = "v${version}";
hash = "sha256-NwKXVzS2SMahamJi1NF+Ltp3LrVZWW+6gHIfnLGxpyk=";
};

meta = with lib; {
description = "Concurrency primitives";
homepage = "https://github.com/symmetryinvestments/concurrency";
license = licenses.mit;
maintainers = with maintainers; [];
mainProgram = "concurrency";
platforms = platforms.all;
};
}
55 changes: 55 additions & 0 deletions examples/dub-pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
buildDubPackage,
self',
pkgs,
}: rec {
tsv-utils = pkgs.callPackage ./tsv-utils {
dub = self'.packages.dub;
dmd = self'.packages.dmd;
};
inochi2d = pkgs.callPackage ./inochi2d {
inherit buildDubPackage;
};
graphqld = pkgs.callPackage ./graphqld {
inherit buildDubPackage;
};
dubproxy = pkgs.callPackage ./dubproxy {
inherit buildDubPackage;
};
faked = pkgs.callPackage ./faked {
inherit buildDubPackage;
};
juliad = pkgs.callPackage ./juliad {
inherit buildDubPackage;
};
libbetterc = pkgs.callPackage ./libbetterc {
inherit buildDubPackage;
};
symmetry-gelf = pkgs.callPackage ./symmetry-gelf {
inherit buildDubPackage;
};
xlsxreader = pkgs.callPackage ./xlsxreader {
inherit buildDubPackage;
};
mir-algorithm = pkgs.callPackage ./mir-algorithm {
inherit buildDubPackage;
};
mir-optim = pkgs.callPackage ./mir-optim {
inherit buildDubPackage;
};
dpp = pkgs.callPackage ./dpp {
inherit buildDubPackage;
};
lubeck = pkgs.callPackage ./lubeck {
inherit buildDubPackage;
};
dust-mite = pkgs.callPackage ./dust-mite {
inherit buildDubPackage;
};
concurrency = pkgs.callPackage ./concurrency {
inherit buildDubPackage;
};
arsd = pkgs.callPackage ./arsd {
inherit buildDubPackage;
};
}
29 changes: 29 additions & 0 deletions examples/dub-pkgs/dpp/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
pkgs,
}:
buildDubPackage rec {
pname = "dpp";
version = "0.5.5";

src = fetchFromGitHub {
owner = "atilaneves";
repo = "dpp";
rev = "v${version}";
hash = "sha256-8/nfsh0KuwF1O0tvsdYoSeccsANU+Xoj9z4Z5h82Iy0=";
};

buildInputs = with pkgs; [libclang];
dontDubTest = true;

meta = with lib; {
description = "Directly include C headers in D source code";
homepage = "https://github.com/atilaneves/dpp";
license = licenses.boost;
maintainers = with maintainers; [];
mainProgram = "dpp";
platforms = platforms.all;
};
}
40 changes: 40 additions & 0 deletions examples/dub-pkgs/dubproxy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
lib,
writeShellScriptBin,
buildDubPackage,
fetchFromGitHub,
}: let
fakeGit = writeShellScriptBin "git" ''
#!/bin/sh
echo "fake-git: $@" >&2
exit 0
'';
in
buildDubPackage rec {
pname = "dubproxy";
version = "1.1.3";

src = fetchFromGitHub {
owner = "symmetryinvestments";
repo = "dubproxy";
rev = "v${version}";
hash = "sha256-olQ2gcGHsTETXqa7FbBZ986kHN0wRQulak/maHkEYmA=";
leaveDotGit = true;
};

dubSelections = ./dub.selections.json;
dubBuildFlags = [
"--config=cli"
];
dontDubTest = true;
nativeBuildInputs = [fakeGit];

meta = with lib; {
description = "A small library and cli to bypass code.dlang.org in a way transparent to dub";
homepage = "https://github.com/symmetryinvestments/dubproxy";
license = licenses.lgpl3Only;
maintainers = with maintainers; [];
mainProgram = "dubproxy";
platforms = platforms.all;
};
}
6 changes: 6 additions & 0 deletions examples/dub-pkgs/dubproxy/dub.selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"fileVersion": 1,
"versions": {
"urld": "2.1.1"
}
}
25 changes: 25 additions & 0 deletions examples/dub-pkgs/dust-mite/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
}:
buildDubPackage rec {
pname = "dust-mite";
version = "0.0.430";

src = fetchFromGitHub {
owner = "CyberShadow";
repo = "DustMite";
rev = "v${version}";
hash = "sha256-gtNzxv2UeLfA2sPV/MqSl1Xuw98AftfttyAXBCnnDgk=";
};

meta = with lib; {
description = "General-purpose data reduction tool";
homepage = "https://github.com/CyberShadow/DustMite";
license = licenses.boost;
maintainers = with maintainers; [];
mainProgram = "dust-mite";
platforms = platforms.all;
};
}
25 changes: 25 additions & 0 deletions examples/dub-pkgs/faked/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
}:
buildDubPackage rec {
pname = "faked";
version = "6.0.1";

src = fetchFromGitHub {
owner = "symmetryinvestments";
repo = "faked";
rev = "v${version}";
hash = "sha256-wFenQqhqcoWYEmlvdXRUMUGBuQ4tdYLHaDVuyBtT+8g=";
};

meta = with lib; {
description = "D library to create real fake data";
homepage = "https://github.com/symmetryinvestments/faked";
license = licenses.mit;
maintainers = with maintainers; [];
mainProgram = "faked";
platforms = platforms.all;
};
}
29 changes: 29 additions & 0 deletions examples/dub-pkgs/graphqld/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
lib,
buildDubPackage,
fetchFromGitHub,
pkgs,
}:
buildDubPackage rec {
pname = "graphqld";
version = "5.1.5";

src = fetchFromGitHub {
owner = "burner";
repo = "graphqld";
rev = "v${version}";
hash = "sha256-X4Kv1ORNJba0c9w/yM6Wz1cfrD+vTjCNkobzq+rV12E=";
};

dubSelections = ./dub.selections.json;
buildInputs = with pkgs; [openssl];

meta = with lib; {
description = "A vibe.d library to handle the GraphQL Protocol written in the D Programming Language";
homepage = "https://github.com/burner/graphqld";
license = licenses.lgpl3Only;
maintainers = with maintainers; [];
mainProgram = "graphqld";
platforms = platforms.all;
};
}
24 changes: 24 additions & 0 deletions examples/dub-pkgs/graphqld/dub.selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"fileVersion": 1,
"versions": {
"diet-ng": "1.8.1",
"eventcore": "0.9.30",
"exceptionhandling": "1.0.0",
"fixedsizearray": "1.3.0",
"libasync": "0.8.6",
"memutils": "1.0.10",
"mir-linux-kernel": "1.0.1",
"nullablestore": "2.1.0",
"openssl": "3.3.3",
"openssl-static": "1.0.3+3.0.8",
"stdx-allocator": "2.77.5",
"taggedalgebraic": "0.11.22",
"vibe-container": "1.3.1",
"vibe-core": "2.8.4",
"vibe-d": "0.10.0",
"vibe-http": "1.0.0",
"vibe-inet": "1.0.0",
"vibe-serialization": "1.0.2",
"vibe-stream": "1.1.0"
}
}
Loading