From 6fbe501f9a560c4b9598e058b3b1bd93cd8cf77d Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 20 Oct 2022 10:31:00 +0200 Subject: [PATCH] Add standard nix files and nix-ld --- flake-template.nix | 14 ++++++++++++++ nix-ld.nix | 8 ++++++++ shell.nix | 9 +++++++++ 3 files changed, 31 insertions(+) create mode 100644 flake-template.nix create mode 100644 nix-ld.nix create mode 100644 shell.nix diff --git a/flake-template.nix b/flake-template.nix new file mode 100644 index 0000000..8c7ed5b --- /dev/null +++ b/flake-template.nix @@ -0,0 +1,14 @@ +{ + description = ""; + + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + { + devShell = import ./shell.nix { inherit pkgs; }; + } + ); +} diff --git a/nix-ld.nix b/nix-ld.nix new file mode 100644 index 0000000..ce9314e --- /dev/null +++ b/nix-ld.nix @@ -0,0 +1,8 @@ +{ pkgs ? import { } }: + +with pkgs; + +mkShell { + NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [ stdenv.cc.cc openssl ]; + NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker"; +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..81c823e --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import {} }: + +with pkgs; + +mkShell { + buildInputs = [ + + ]; +}