Skip to content

Commit

Permalink
flaking repository
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Aug 3, 2024
1 parent bf6829e commit 029be21
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
description = "The Osmon Programming Language";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
# nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
flake-utils,
...
} @ inputs: let
lib = nixpkgs.lib;
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];

forAllSystems = nixpkgs.lib.genAttrs systems;
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs systems (system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
});
devShellFor = system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
script = import ./shell.nix {inherit pkgs;};
in
script;
in {
formatter =
forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
devShell = lib.mapAttrs (system: _: devShellFor system) (lib.genAttrs systems {});
};
}

0 comments on commit 029be21

Please sign in to comment.