-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Nix flake derivation #2644
Add Nix flake derivation #2644
Changes from 12 commits
0ca3bd3
cbfcd7b
c366400
d852f9c
84d6679
1f548e3
5373b1d
655cdac
63f68ab
4be5f4f
9ce7df7
e440339
f2f4e71
a8d076d
5554234
0985535
bfdfd33
559e05a
96856a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
let | ||
sources = import ./nix/sources.nix; | ||
pinned = import sources."nixpkgs" { config = {}; overlays = [ ( import ./nix/overlays/z3.nix ) ]; }; | ||
in | ||
pinned = import sources."nixpkgs" { | ||
config = { }; | ||
overlays = [ (import ./nix/overlays/z3.nix) ]; | ||
}; | ||
|
||
{ pkgs ? pinned | ||
in { pkgs ? pinned | ||
|
||
# Build an optimized release package. | ||
# Currently requires dependents to use LTO. Use sparingly. | ||
, release ? false | ||
}: | ||
# Build an optimized release package. | ||
# Currently requires dependents to use LTO. Use sparingly. | ||
, release ? false }: | ||
|
||
let | ||
inherit (pkgs) callPackage; | ||
|
@@ -25,19 +26,41 @@ let | |
subDir = "llvm-backend/src/main/native/llvm-backend"; | ||
}; | ||
}; | ||
inherit (llvm-backend-project) clang llvm-backend; | ||
inherit (llvm-backend-project) llvm-backend; | ||
inherit (pkgs) clang; | ||
|
||
k = callPackage ./nix/k.nix { | ||
src = ttuegel.cleanSourceWith { | ||
name = "k"; | ||
src = ttuegel.cleanGit { | ||
src = ./.; | ||
name = "k"; | ||
}; | ||
ignore = [ | ||
"result*" | ||
"nix/" | ||
"*.nix" | ||
"haskell-backend/src/main/native/haskell-backend/*" | ||
"llvm-backend/src/main/native/llvm-backend/*" | ||
"!llvm-backend/src/main/native/llvm-backend/matching" # need pom.xml | ||
"k-distribution/tests/regression-new" | ||
]; | ||
}; | ||
Comment on lines
+33
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved the source cleaning out of |
||
inherit haskell-backend llvm-backend mavenix prelude-kore; | ||
inherit (ttuegel) cleanGit cleanSourceWith; | ||
debugger = | ||
if pkgs.system == "x86_64-darwin" || pkgs.system == "aarch64-darwin" then | ||
pkgs.lldb | ||
else | ||
pkgs.gdb; | ||
Comment on lines
+50
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added gdb/lldb as a runtime dependency to the k binaries
Comment on lines
+50
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added gdb/lldb as a runtime dependency to the k binaries |
||
}; | ||
|
||
haskell-backend-project = import ./haskell-backend/src/main/native/haskell-backend { | ||
src = ttuegel.cleanGitSubtree { | ||
src = ./.; | ||
subDir = "haskell-backend/src/main/native/haskell-backend"; | ||
haskell-backend-project = | ||
import ./haskell-backend/src/main/native/haskell-backend { | ||
src = ttuegel.cleanGitSubtree { | ||
src = ./.; | ||
subDir = "haskell-backend/src/main/native/haskell-backend"; | ||
}; | ||
}; | ||
}; | ||
haskell-backend = haskell-backend-project.kore; | ||
inherit (haskell-backend-project) prelude-kore; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved the source cleaning out of
nix/k.nix
since the flkae re-uses the same expression and does its own source cleaning