From 157119397187aeffac14159cd320589bb86f6ebc Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 8 Apr 2021 05:46:06 +0200 Subject: [PATCH] llvm config fix (which did not work) --- configs/sputnik/nginx.nix | 2 -- system/all/packages.nix | 2 ++ system/all/packages/llvm-config-dummy.nix | 41 +++++++++++++++++++++++ system/server/packages.nix | 3 +- 4 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 system/all/packages/llvm-config-dummy.nix diff --git a/configs/sputnik/nginx.nix b/configs/sputnik/nginx.nix index 3e6fe25..657f3c9 100644 --- a/configs/sputnik/nginx.nix +++ b/configs/sputnik/nginx.nix @@ -284,7 +284,6 @@ in { } // error.locations; }; - #"home.ingolf-wagner.de" = { # listen = [ # { @@ -324,7 +323,6 @@ in { # }; #}; - }; }; diff --git a/system/all/packages.nix b/system/all/packages.nix index 7071ef9..219dddd 100644 --- a/system/all/packages.nix +++ b/system/all/packages.nix @@ -43,6 +43,8 @@ let in { + #imports = [ ./packages/llvm-config-dummy.nix ]; + programs.tmux = { enable = true; clock24 = true; diff --git a/system/all/packages/llvm-config-dummy.nix b/system/all/packages/llvm-config-dummy.nix new file mode 100644 index 0000000..3435ef6 --- /dev/null +++ b/system/all/packages/llvm-config-dummy.nix @@ -0,0 +1,41 @@ +{ pkgs, config, lib, ... }: +with pkgs.stdenv.lib; { + environment.systemPackages = let + llvm = pkgs.llvm; + llvm-config = pkgs.writers.writeBashBin "llvm-config" '' + while [[ $# -gt 0 ]]; do + arg="$1" + case $arg in + --assertion-mode) + echo "OFF" + ;; + --bindir) + echo "${getBin llvm}/bin" + ;; + --libdir) + echo "${getLib llvm}/lib" + ;; + --includedir) + echo "${getDev llvm}/include" + ;; + --prefix) + echo "${llvm.out}" + ;; + --src-root) + echo "/build/llvm"; + ;; + --obj-root) + echo "/build/llvm/build"; + ;; + --cmakedir) + echo "${getDev llvm}/lib/cmake/llvm" + ;; + *) + echo "Unhandled argument '$arg' passed to dummy llvm-config!" + exit 1 + esac + shift + done + ''; + in [ llvm-config ]; +} diff --git a/system/server/packages.nix b/system/server/packages.nix index d146fb1..f75b3ca 100644 --- a/system/server/packages.nix +++ b/system/server/packages.nix @@ -1,5 +1,4 @@ -{ pkgs, config, lib, ... }: -{ +{ pkgs, config, lib, ... }: { # no need to to start a service environment.systemPackages = let