aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 707e97f7e39469f1f8c7fa09d9da8c6ac3baee14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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";
      };
    in
      {
        default = pkgs.stdenv.mkDerivation {
          pname = "umami";
          version = "1.0.0";

          src = ./.;

          buildInputs = with pkgs; [ clang gnumake valgrind bear openssl ];

          buildPhase = "make";

          installPhase = ''
          mkdir -p $out
          cp -r bin/ $out/
        '';
        };
      };

    devShell.x86_64-linux = let
      pkgs = import nixpkgs {
        system = "x86_64-linux";
      };
    in
      pkgs.mkShell {
        buildInputs = with pkgs; [ clang gnumake valgrind bear openssl ];
      };
  };
}