Simplification
This commit is contained in:
parent
5a554023fa
commit
cd0756e4b1
2 changed files with 12 additions and 29 deletions
18
flake.lock
18
flake.lock
|
@ -18,23 +18,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
23
flake.nix
23
flake.nix
|
@ -3,18 +3,22 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
systems.url = "github:nix-systems/default";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
...
|
||||
}: let
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs (import systems);
|
||||
pkgsFor = eachSystem (system:
|
||||
forAllSystems = lib.genAttrs [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
pkgsFor = forAllSystems (system:
|
||||
import nixpkgs {
|
||||
localSystem.system = system;
|
||||
overlays = with self.overlays; [chicken tcc-mob];
|
||||
|
@ -23,29 +27,24 @@
|
|||
overlays = {
|
||||
default = self.overlays.chicken;
|
||||
|
||||
tcc-mob = final: prev: {
|
||||
chicken = final: prev: {
|
||||
tcc-mob = final.callPackage ./nix/tinycc.nix {
|
||||
stdenv = final.gcc13Stdenv;
|
||||
};
|
||||
};
|
||||
|
||||
chicken = final: prev: {
|
||||
chicken = final.callPackage ./nix/chicken.nix {
|
||||
stdenv = final.gcc13Stdenv;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
devShells = eachSystem (system: {
|
||||
devShells = forAllSystems (system: {
|
||||
default = let
|
||||
pkgs = import nixpkgs {
|
||||
overlays = [ self.overlays.tcc-mob self.overlays.chicken ];
|
||||
overlays = [ self.overlays.chicken ];
|
||||
};
|
||||
in pkgs.mkShell {
|
||||
packages = with pkgs; [ tcc-mob chicken pkg-config ]
|
||||
++ (with pkgs.chickenPackages_5.chickenEggs; [
|
||||
lsp-server
|
||||
transducers
|
||||
]);
|
||||
shellHook = ''
|
||||
export CC=${pkgs.tcc-mob}/bin/tcc
|
||||
|
|
Loading…
Reference in a new issue