diff options
| author | rucadi <ruben.cano96@gmail.com> | 2026-01-13 10:23:48 +0100 |
|---|---|---|
| committer | rucadi <ruben.cano96@gmail.com> | 2026-01-13 10:23:48 +0100 |
| commit | 2aff28124d4b2d52aa0e772a60c86045dc3b4075 (patch) | |
| tree | e7e125f2e927bd7bcc646a51c952f8d96bdea52e /flake.nix | |
| parent | ec9797df2a589d0a8cd36beb632956a1ec1f6bfc (diff) | |
Add nix flake for building and distributing zen-c
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 41 |
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"; + }; + }; + } + ); +} |
