diff options
author | Linnnus <[email protected]> | 2024-02-14 17:56:30 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-02-14 17:56:30 +0100 |
commit | cfb648daef74f695e42e3314c05296a72168860c (patch) | |
tree | a4631fcdbc20bccb4640a3fa2484606f44cd2bc4 | |
parent | 2b11289379b5ba3d6d67b88211df0862f4b92ebd (diff) |
build: Use stdenv from llvmPackages
This patch updates the flake to use llvmPackages.stdenv rather than the
default pkgs.stdenv. This fixes an issue on MacOS where the ASAN runtime
library isn't found. I have no idea why.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | flake.nix | 16 |
2 files changed, 12 insertions, 6 deletions
@@ -1,7 +1,7 @@ .POSIX: .PHONY: all install uninstall clean -CC := cc +CC ?= cc CFLAGS := -W -O $(shell pkg-config --cflags libgit2) CFLAGS += -g3 -O0 -fsanitize=address,undefined -fsanitize-trap CFLAGS += -Wall -Wextra -Wconversion -Wdouble-promotion \ @@ -10,8 +10,9 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; + stdenv = pkgs.llvmPackages_14.stdenv; - simple-wiki = pkgs.stdenv.mkDerivation { + simple-wiki = stdenv.mkDerivation { pname = "simple-wiki"; version = "0.0.0"; @@ -24,9 +25,15 @@ mkdir -p $out make PREFIX=$out install ''; + + meta = with pkgs.lib; { + description = "Simplest possible wiki system"; + license = licenses.unlicense; + mainProgram = "simplewiki"; + }; }; - creole-test = pkgs.stdenv.mkDerivation rec { + creole-test = stdenv.mkDerivation rec { pname = "creole-test"; version = simple-wiki.version; @@ -42,9 +49,8 @@ ''; }; - devShell = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ pkg-config ]; - buildInputs = with pkgs; [ libgit2 ]; + devShell = (pkgs.mkShell.override { inherit stdenv; }) { + inputsFrom = [ simple-wiki creole-test ]; }; in { |