aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2024-12-24 21:11:06 -0800
committerPreston Pan <ret2pop@gmail.com>2024-12-24 21:11:06 -0800
commite75d6f6b8f4512a5bbfecbfa8c17f0bb687e3d55 (patch)
tree7a96002751a1ca3b173762a13b181ebea4123817 /flake.nix
first commit
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix42
1 files changed, 42 insertions, 0 deletions
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 ];
+ };
+ };
+}
+