Skip to content
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

Merged
merged 19 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 37 additions & 14 deletions default.nix
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;
Expand All @@ -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
Copy link
Contributor Author

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

Comment on lines +33 to +48
Copy link
Contributor Author

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

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
Copy link
Contributor Author

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

Comment on lines +50 to +54
Copy link
Contributor Author

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

};

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;

Expand Down
Loading