From 7b32822a32ffa1c21fe1cd8cf54bb9fa74118cd2 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Thu, 1 Feb 2024 20:20:42 +0100 Subject: [PATCH] add default snowflake lib and shell as example --- lib/default.nix | 18 ++++++++++++++++++ shells/default/default.nix | 14 ++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 lib/default.nix create mode 100644 shells/default/default.nix diff --git a/lib/default.nix b/lib/default.nix new file mode 100644 index 0000000..77fc4c7 --- /dev/null +++ b/lib/default.nix @@ -0,0 +1,18 @@ +{ +# This is the merged library containing your namespaced library as well as all libraries from +# your flake's inputs. +lib, + +# Your flake inputs are also available. +inputs, + +# Additionally, Snowfall Lib's own inputs are passed. You probably don't need to use this! +snowfall-inputs, }: { + # This will be available as `lib.my-namespace.my-helper-function`. + my-helper-function = x: x; + + my-scope = { + # This will be available as `lib.my-namespace.my-scope.my-scoped-helper-function`. + my-scoped-helper-function = x: x; + }; +} diff --git a/shells/default/default.nix b/shells/default/default.nix new file mode 100644 index 0000000..f835f34 --- /dev/null +++ b/shells/default/default.nix @@ -0,0 +1,14 @@ +{ +# Snowfall Lib provides a customized `lib` instance with access to your flake's library +# as well as the libraries available from your flake's inputs. +lib, +# You also have access to your flake's inputs. +inputs, + +# All other arguments come from NixPkgs. You can use `pkgs` to pull shells or helpers +# programmatically or you may add the named attributes as arguments here. +pkgs, stdenv, ... }: + +pkgs.mkShell { + # Create your shell +}