Skip to content

Commit 1ef9292

Browse files
committed
fix: upgrading flake.nix completed
1 parent 055ccad commit 1ef9292

File tree

3 files changed

+57
-50
lines changed

3 files changed

+57
-50
lines changed

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,50 @@
22
description = "The Jakt Programming Language";
33

44
inputs = {
5-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
66
utils.url = "github:numtide/flake-utils";
77
};
88

9-
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: let
10-
pkgs = import nixpkgs { inherit system; };
11-
12-
clang_18 = pkgs.clang_18; # prepare clang_18 from the channel
13-
14-
jakt = pkgs.callPackage ({ callPackage, symlinkJoin, makeWrapper }: let
15-
jakt-unwrapped = callPackage ./jakt.nix { inherit clang_18; };
16-
in symlinkJoin {
17-
name = "jakt";
18-
19-
paths = [ jakt-unwrapped ];
20-
nativeBuildInputs = [ makeWrapper ];
21-
22-
postBuild = ''
23-
wrapProgram $out/bin/jakt_stage0 \
24-
--prefix PATH : ${clang_18}/bin
25-
26-
wrapProgram $out/bin/jakt_stage1 \
27-
--prefix PATH : ${clang_18}/bin
28-
'';
29-
30-
passthru.unwrapped = jakt-unwrapped;
31-
}) {};
32-
in {
33-
packages.jakt-unwrapped = jakt.unwrapped;
34-
packages.jakt = jakt;
35-
packages.default = jakt;
36-
37-
devShells.default = pkgs.mkShell {
38-
packages = let
39-
inherit (jakt.unwrapped) buildInputs nativeBuildInputs;
40-
in buildInputs ++ nativeBuildInputs;
41-
};
42-
});
43-
}
9+
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
10+
let
11+
pkgs = import nixpkgs { inherit system; };
12+
13+
clang_18 = pkgs.clang_18;
14+
15+
jakt = pkgs.callPackage
16+
({ callPackage, symlinkJoin, makeWrapper }:
17+
let
18+
jakt-unwrapped = callPackage ./jakt.nix { inherit clang_18; };
19+
in
20+
symlinkJoin {
21+
name = "jakt";
22+
23+
paths = [ jakt-unwrapped ];
24+
nativeBuildInputs = [ makeWrapper ];
25+
26+
postBuild = ''
27+
wrapProgram $out/bin/jakt_stage0 \
28+
--prefix PATH : ${clang_18}/bin
29+
30+
wrapProgram $out/bin/jakt_stage1 \
31+
--prefix PATH : ${clang_18}/bin
32+
'';
33+
34+
passthru.unwrapped = jakt-unwrapped;
35+
})
36+
{ };
37+
in
38+
{
39+
packages.jakt-unwrapped = jakt.unwrapped;
40+
packages.jakt = jakt;
41+
packages.default = jakt;
42+
43+
devShells.default = pkgs.mkShell {
44+
packages =
45+
let
46+
inherit (jakt.unwrapped) buildInputs nativeBuildInputs;
47+
in
48+
buildInputs ++ nativeBuildInputs;
49+
};
50+
});
51+
}

jakt.nix

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
{
2-
stdenv,
3-
fetchFromGitHub,
4-
5-
clang_18,
6-
cmake,
7-
ninja,
8-
pkg-config,
9-
python3,
1+
{ stdenv
2+
, fetchFromGitHub
3+
, clang_18
4+
, cmake
5+
, ninja
6+
, pkg-config
7+
, python3
108
}:
119

1210
let
@@ -16,7 +14,8 @@ let
1614
rev = "05e78dabdbceea46bae7dca52b63dc0a115e7b52"; # latest at the time
1715
hash = "sha256-ymXQ68Uib1xP4eGPuxm3vRgAIhrVK4rmHdGLfuvsOJU=";
1816
};
19-
in stdenv.mkDerivation {
17+
in
18+
stdenv.mkDerivation {
2019
name = "jakt-unwrapped";
2120
src = ./.;
2221

0 commit comments

Comments
 (0)