diff options
Diffstat (limited to '')
-rw-r--r-- | c/flake.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/c/flake.nix b/c/flake.nix new file mode 100644 index 0000000..a7da918 --- /dev/null +++ b/c/flake.nix @@ -0,0 +1,53 @@ +{ + description = "<Project description>"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + # inputs for following + systems = { + url = "github:nix-systems/x86_64-linux"; # only evaluate for this system + }; + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; + flake-utils = { + url = "github:numtide/flake-utils"; + inputs = { + systems.follows = "systems"; + }; + }; + }; + + outputs = { + self, + nixpkgs, + flake-utils, + ... + }: + flake-utils.lib.eachDefaultSystem (system: let + pkgs = nixpkgs.legacyPackages."${system}"; + + nativeBuildInputs = with pkgs; [valgrind]; + in { + packages.default = pkgs.stdenv.mkDerivation { + src = ./.; + pname = "<pkgs_name>"; + version = "0.1"; + makeFlags = ["PREFIX=${placeholder "out"}"]; + inherit nativeBuildInputs; + }; + apps.default = { + type = "app"; + program = "${self.packages.${system}.default}/bin/<pkgs_name>"; + }; + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + cocogitto + ]; + inherit nativeBuildInputs; + }; + }); +} +# vim: ts=2 |