summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-13 14:57:11 +0000
committerGitHub <noreply@github.com>2026-01-13 14:57:11 +0000
commit0e253b90957ef2e8e8105ea65b1ff87d513bca9e (patch)
treef9821c1d54f15d058ea508e6feb839c7b0439912 /flake.nix
parent606db9c49b4f6f6514cbce92a11fb0b6a47fc122 (diff)
parent2aff28124d4b2d52aa0e772a60c86045dc3b4075 (diff)
Merge pull request #25 from Rucadi/main
Add nix flake for building and distributing zen-c
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..0a9eefc
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,41 @@
+{
+ description = "Zen-C compiler";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs =
+ {
+ self,
+ nixpkgs,
+ flake-utils,
+ }:
+ flake-utils.lib.eachDefaultSystem (
+ system:
+ let
+ pkgs = import nixpkgs { inherit system; };
+
+ lib = pkgs.lib;
+ in
+ {
+ packages.default = pkgs.stdenv.mkDerivation {
+ pname = "zen-c";
+ version = "unstable";
+
+ src = self;
+
+ env.PREFIX = placeholder "out";
+
+ meta = {
+ description = "Zen-C programming language compiler";
+ homepage = "https://github.com/z-libs/Zen-C";
+ license = lib.licenses.mit;
+ platforms = lib.platforms.unix;
+ mainProgram = "zc";
+ };
+ };
+ }
+ );
+}