aboutsummaryrefslogtreecommitdiffstats
path: root/c/flake.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-08-21 01:24:12 +0200
committerSoispha <soispha@vhack.eu>2023-08-21 01:24:12 +0200
commit29db1ce52445a809ae9e4f7db2a19ccfa9904e31 (patch)
treecc5b8144b28ba7a2382892c45c235f9a0638b2b5 /c/flake.nix
parentFix(latex): Remove state full chapter files (diff)
downloadflake-templates-29db1ce52445a809ae9e4f7db2a19ccfa9904e31.zip
Feat(c): Init
Diffstat (limited to '')
-rw-r--r--c/flake.nix53
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