tangled
alpha
login
or
join now
jaspermayone.com
/
dots
0
fork
atom
@jaspermayone.com's dotfiles
0
fork
atom
overview
issues
pulls
pipelines
Simplify QMD package using Bun
jaspermayone.com
1 month ago
091c7415
e789377f
+21
-24
1 changed file
expand all
collapse all
unified
split
packages
qmd.nix
+21
-24
packages/qmd.nix
···
1
1
{
2
2
lib,
3
3
-
buildNpmPackage,
3
3
+
stdenvNoCC,
4
4
fetchFromGitHub,
5
5
-
nodejs,
6
6
-
python3,
7
7
-
stdenv,
8
8
-
darwin,
5
5
+
bun,
6
6
+
makeWrapper,
9
7
}:
10
8
11
11
-
buildNpmPackage rec {
9
9
+
stdenvNoCC.mkDerivation rec {
12
10
pname = "qmd";
13
13
-
version = "unstable-2025-01-31";
11
11
+
version = "unstable-2025-02-01";
14
12
15
13
src = fetchFromGitHub {
16
14
owner = "tobi";
···
19
17
hash = lib.fakeHash;
20
18
};
21
19
22
22
-
npmDepsHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="; # Placeholder - needs to be updated
23
23
-
24
20
nativeBuildInputs = [
25
25
-
nodejs
26
26
-
python3
27
27
-
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
28
28
-
darwin.cctools
21
21
+
bun
22
22
+
makeWrapper
29
23
];
30
24
31
31
-
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
32
32
-
with darwin.apple_sdk.frameworks; [
33
33
-
Security
34
34
-
]
35
35
-
);
25
25
+
buildPhase = ''
26
26
+
runHook preBuild
27
27
+
HOME=$TMPDIR bun install --frozen-lockfile --no-progress
28
28
+
runHook postBuild
29
29
+
'';
36
30
37
37
-
# Skip npm install scripts that might fail
38
38
-
npmInstallFlags = [ "--ignore-scripts" ];
31
31
+
installPhase = ''
32
32
+
runHook preInstall
39
33
40
40
-
# QMD requires Bun runtime but can be built with npm
41
41
-
postInstall = ''
42
42
-
# Ensure binary is executable
43
43
-
chmod +x $out/bin/qmd
34
34
+
mkdir -p $out/lib/qmd $out/bin
35
35
+
cp -r . $out/lib/qmd/
36
36
+
37
37
+
makeWrapper ${bun}/bin/bun $out/bin/qmd \
38
38
+
--add-flags "run $out/lib/qmd/src/cli.ts"
39
39
+
40
40
+
runHook postInstall
44
41
'';
45
42
46
43
meta = with lib; {