From becafeba45c3bf51de8ee3c523d19ae68dd6754a Mon Sep 17 00:00:00 2001 From: Minijackson Date: Tue, 9 Nov 2021 11:01:52 +0100 Subject: initial commit with basic logging --- flake.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ad3d540 --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "A simple bash library for your scripting needs"; + + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, flake-utils }: + with flake-utils.lib; + eachSystem allSystems (system: { + + # Convert a path to a derivation + # This is done so we don't depend on nixpkgs + packages.bash-lib = with builtins; derivation { + name = "bash-lib.sh"; + src = readFile ./bash-lib.sh; + inherit system; + + builder = "/bin/sh"; + args = [ + (toFile "builder.sh" '' + echo "$src" > $out + '') + ]; + }; + + defaultPackage = self.packages.${system}.bash-lib; + }); +} -- cgit v1.2.3