From e75d6f6b8f4512a5bbfecbfa8c17f0bb687e3d55 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Tue, 24 Dec 2024 21:11:06 -0800 Subject: first commit --- flake.nix | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7d8c456 --- /dev/null +++ b/flake.nix @@ -0,0 +1,42 @@ +{ + description = "A Nix flake for creating a devshell and build environment for umami"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs }: { + packages.x86_64-linux = let + pkgs = import nixpkgs { + system = "x86_64-linux"; # Adjust for your system, e.g., aarch64-darwin + }; + in + { + default = pkgs.stdenv.mkDerivation { + pname = "umami"; + version = "1.0.0"; + + src = ./.; + + buildInputs = with pkgs; [ clang gnumake valgrind bear ]; + + buildPhase = "make"; + + installPhase = '' + mkdir -p $out/bin + cp ./bin/umami $out/bin/ + ''; + }; + }; + + devShell.x86_64-linux = let + pkgs = import nixpkgs { + system = "x86_64-linux"; + }; + in + pkgs.mkShell { + buildInputs = with pkgs; [ clang gnumake valgrind bear ]; + }; + }; +} + -- cgit