-
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
Conversation
haskell-backend | ||
mavenix.cli | ||
]; | ||
buildInputs = [ llvm-backend haskell-backend mavenix.cli ]; |
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.
just nixfmt formatting changes
haskell-backend | ||
mavenix.cli | ||
]; | ||
buildInputs = [ llvm-backend haskell-backend mavenix.cli ]; |
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.
just nixfmt formatting changes
"KORE_PRINT=kore-print" | ||
"PACKAGE_VERSION=${lib.fileContents ./package/version}" | ||
"--output-sync" | ||
] ++ lib.optional (test != null) "-C ${test}"; | ||
enableParallelBuilding = true; | ||
preBuild = '' | ||
cd tests/regression-new |
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.
just nixfmt formatting changes
"KORE_PRINT=kore-print" | ||
"PACKAGE_VERSION=${lib.fileContents ./package/version}" | ||
"--output-sync" | ||
] ++ lib.optional (test != null) "-C ${test}"; | ||
enableParallelBuilding = true; | ||
preBuild = '' | ||
cd tests/regression-new |
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.
just nixfmt formatting changes
mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); } | ||
in mkSources (mkConfig { }) // { | ||
__functor = _: settings: mkSources (mkConfig settings); | ||
} |
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.
just nixfmt formatting changes
mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); } | ||
in mkSources (mkConfig { }) // { | ||
__functor = _: settings: mkSources (mkConfig settings); | ||
} |
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.
just nixfmt formatting changes
in mkShell { | ||
buildInputs = [ mavenix.cli ]; | ||
} | ||
in mkShell { buildInputs = [ mavenix.cli ]; } |
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.
just nixfmt formatting changes
in mkShell { | ||
buildInputs = [ mavenix.cli ]; | ||
} | ||
in mkShell { buildInputs = [ mavenix.cli ]; } |
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.
just nixfmt formatting changes
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" | ||
]; | ||
}; |
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
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" | ||
]; | ||
}; |
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
debugger = | ||
if pkgs.system == "x86_64-darwin" || pkgs.system == "aarch64-darwin" then | ||
pkgs.lldb | ||
else | ||
pkgs.gdb; |
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.
added gdb/lldb as a runtime dependency to the k binaries
debugger = | ||
if pkgs.system == "x86_64-darwin" || pkgs.system == "aarch64-darwin" then | ||
pkgs.lldb | ||
else | ||
pkgs.gdb; |
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.
added gdb/lldb as a runtime dependency to the k binaries
LGTM |
* new nix flake * bump llvm and haskell deps * updatde llvm-backend * bump llvm-backend * cleanup and new pinned versions * llvm-backend now pinned to master * revert clang dependency + replace ln -s with ln -sf * add overlays * added gdb/lldb to runtime dependecnies of all k execs * remove krun change * add proper versioning to nix expression * flake.lock * haskell-backend now tracs master
This PR adds an alternative way of building K using the (currently) experimental flakes feature, as per #2607. The flake is largely independent of the current nix derivation, however since it uses the current
nix/k.nix
file, some tweaks had to be made to make sure this derivation builds both with the currentdefault.nix
file and the newflake.nix
. The changes tonix/k.nix
mostly involve pulling out thettuegel
functions for cleaning the git source out ofnix/k.nix
intodefault.nix
and passing in the cleaned source as a function argument tonix/k.nix
directly.The changes to
shell.nix
andtest.nix
are mainly cosmetic.Before the new flake derivation can replace the current one in the CI,
tests.nix
has to be ported into the flake.