add virtualbox to fw; add z3 package

This commit is contained in:
Shelvacu
2024-10-04 16:04:58 -07:00
parent 5d21668904
commit 5e052d6cc7
5 changed files with 56 additions and 3 deletions

View File

@@ -339,6 +339,7 @@
{
formatter = pkgs.nixfmt-rfc-style;
packages = {
z3 = pkgs.callPackage ./packages/z3 { };
sm64coopdx = pkgs.callPackage ./coopdx2.nix { };
# snmpb = pkgs.libsForQt5.callPackage ./packages/snmpb/package.nix { };
# snmp-mibs-downloader = pkgs.callPackage ./packages/snmp-mibs-downloader.nix { };

View File

@@ -1,5 +1,4 @@
{
config,
inputs,
pkgs,
...
@@ -13,7 +12,7 @@
./thunderbolt.nix
./fwupd.nix
./zfs.nix
#./experiment.nix
./virtualbox.nix
];
vacu.hostName = "fw"; # Define your hostname.
@@ -64,7 +63,7 @@
tremotesf
smartmontools
nvme-cli
p7zip
(p7zip.override { enableUnfree = true; })
])
++ [ inputs.self.packages.${pkgs.system}.sm64coopdx ];

8
fw/virtualbox.nix Normal file
View File

@@ -0,0 +1,8 @@
{ ... }: {
virtualisation.virtualbox.host = {
enable = true;
enableExtensionPack = true;
};
users.extraGroups.vboxusers.members = [ "shelvacu" ];
}

23
packages/z3/default.nix Normal file
View File

@@ -0,0 +1,23 @@
{
stdenv,
cmake,
gnumake,
python3,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "z3";
version = "4.13.2";
nativeBuildInputs = [ cmake gnumake python3 ];
patches = [ ./pkg-config-fix.patch ];
src = fetchFromGitHub {
owner = "Z3Prover";
repo = "z3";
rev = "z3-${version}";
hash = "sha256-9OpiMhO+75aHo3Nf7qcjC0QBXxxcvT8t7Mqc8bnjZoM=";
};
# CMAKE_ARGS = [ "-DCMAKE_BUILD_TYPE=Release" ];
}

View File

@@ -0,0 +1,22 @@
diff --git a/z3.pc.cmake.in b/z3.pc.cmake.in
index 436dd6208..4aa515b4a 100644
--- a/z3.pc.cmake.in
+++ b/z3.pc.cmake.in
@@ -1,13 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
-sharedlibdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: z3
Description: The Z3 Theorem Prover
Version: @Z3_VERSION@
Requires:
-Libs: -L${libdir} -L${sharedlibdir} -lz3
+Libs: -L${libdir} -lz3
Cflags: -I${includedir}