Skip to content

Commit

Permalink
Update nixpkgs input to be nixos-unstable to get 0.10.0 duckdb (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
craig-latacora authored Mar 14, 2024
1 parent f31c553 commit c78a9c8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 16 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
description = "tmducken - tech.ml.dataset Integration with DuckDB for Clojure";
description =
"tmducken - tech.ml.dataset Integration with DuckDB for Clojure";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
clj-nix.url = "github:jlesquembre/clj-nix";
};
Expand All @@ -15,31 +16,29 @@
# Simulating JNA Platform#getNativeLibraryResourcePrefix()
# Flip arch-os from Nix to os-arch
system-parts = pkgs.lib.splitString "-" pkgs.system;
os-arch-prefix-underscores = builtins.concatStringsSep "-" (pkgs.lib.reverseList system-parts);
os-arch-prefix-underscores =
builtins.concatStringsSep "-" (pkgs.lib.reverseList system-parts);
# NOTE: ^ this contains x86_64, have to fix to be equivalent to JNA
os-arch-prefix = builtins.replaceStrings [ "_" ] [ "-" ] os-arch-prefix-underscores;
os-arch-prefix =
builtins.replaceStrings [ "_" ] [ "-" ] os-arch-prefix-underscores;
lib-folder = "./lib/${os-arch-prefix}";
# Definining a reusable DLL providing script, used for Nix repeatable build AND direnv shell entering (development)
postPatch = ''
mkdir -p ${lib-folder}
ln -sf ${pkgs.duckdb}/lib/* ${lib-folder}
'';
in
{
in {

packages = {
duckdb = pkgs.duckdb;
default =
let version = pkgs.duckdb.version;
in
cljpkgs.mkCljLib
{
inherit postPatch version;
projectSrc = ./.;
name = "com.techascent/tmducken";
buildCommand = "clj -T:build jar --report stderr";
preBuild = "export DUCKDB_VERSION=${version}";
};
default = let version = pkgs.duckdb.version;
in cljpkgs.mkCljLib {
inherit postPatch version;
projectSrc = ./.;
name = "com.techascent/tmducken";
buildCommand = "clj -T:build jar --report stderr";
preBuild = "export DUCKDB_VERSION=${version}";
};
};
devShells.default = pkgs.mkShell {
buildInputs = [
Expand Down

0 comments on commit c78a9c8

Please sign in to comment.