File tree Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Expand file tree Collapse file tree 2 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 99
1010 outputs = {
1111 flake-utils ,
12+ nixpkgs ,
1213 odbc-drivers ,
1314 ...
1415 } : let
2728 odbc-drivers . overlay
2829 ] ;
2930 } ;
31+ # pkgs = import nixpkgs {
32+ # inherit system;
33+ # overlays = [
34+ # odbc-drivers.overlay
35+ # ];
36+ # };
3037 stdenv = pkgs . llvmPackages_15 . stdenv ;
31-
32- # Define a helper function to conditionally include the db2-odbc-driver package as not all arch are supported
33- getDb2OdbcDriver =
34- if system == "aarch64-linux" || system == "aarch64-darwin" then null else pkgs . db2-odbc-driver { } ;
35-
36-
3738 in rec {
3839 # packages exported by the flake
3940 packages = {
40- db2-odbc-driver = getDb2OdbcDriver ;
41+ db2-odbc-driver = pkgs . db2-odbc-driver { } ;
4142 postgres-odbc-driver = pkgs . postgres-odbc-driver { } ;
4243 } ;
4344
6566 generate-odbcinst-ini = {
6667 type = "app" ;
6768 program = toString ( pkgs . writeScript "generate-odbcinst-ini" ''
68- DB2_DRIVER_PATH=${ packages . db2-odbc-driver } /lib/${ if stdenv . isDarwin then "libdb2.dylib" else "libdb2.so" } \
69+ DB2_DRIVER_PATH=${ packages . db2-odbc-driver } /lib/${
70+ if stdenv . isDarwin
71+ then "libdb2.dylib"
72+ else "libdb2.so"
73+ } \
6974 POSTGRES_DRIVER_PATH=${ packages . postgres-odbc-driver } /lib/psqlodbca.so \
7075 envsubst < ./templates/.odbcinst.ini.template > .odbcinst.ini
7176 '' ) ;
7277 } ;
7378 ls-odbc-driver-paths = {
7479 type = "app" ;
7580 program = toString ( pkgs . writeScript "ls-odbc-driver-paths" ''
76- echo "db2 ${ packages . db2-odbc-driver } /lib/${ if stdenv . isDarwin then "libdb2.dylib" else "libdb2.so" } "
81+ echo "db2 ${ packages . db2-odbc-driver } /lib/${
82+ if stdenv . isDarwin
83+ then "libdb2.dylib"
84+ else "libdb2.so"
85+ } "
7786 echo "postgres ${ packages . postgres-odbc-driver } /lib/psqlodbca.so"
7887 '' ) ;
7988 } ;
You can’t perform that action at this time.
0 commit comments