-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8045879
commit 9f589ea
Showing
9 changed files
with
130 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
lib, | ||
fetchFromGitHub, | ||
callPackage, | ||
zig_0_13, | ||
}: | ||
let | ||
versions = [ | ||
{ | ||
zig = zig_0_13; | ||
version = "0-unstable-06-01"; | ||
src = fetchFromGitHub { | ||
owner = "Vexu"; | ||
repo = "arocc"; | ||
rev = "55cb6d1b682b83f75ad4f60e34c6fcd2336e8531"; | ||
hash = "sha256-xs3zNQIC5drrQYT4nxL7Q69xSEdbdMv5+3hQpsX3q5A="; | ||
}; | ||
} | ||
]; | ||
|
||
mkPackage = | ||
{ | ||
zig, | ||
version, | ||
src, | ||
}: | ||
callPackage ./package.nix { inherit zig version src; }; | ||
|
||
pkgsList = lib.map mkPackage versions; | ||
|
||
pkgsAttrsUnwrapped = lib.listToAttrs ( | ||
lib.map (pkg: lib.nameValuePair "${pkg.version}-unwrapped" pkg) pkgsList | ||
); | ||
pkgsAttrsWrapped = lib.listToAttrs ( | ||
lib.map (pkg: lib.nameValuePair pkg.version pkg.wrapped) pkgsList | ||
); | ||
|
||
pkgsAttrs = pkgsAttrsWrapped // pkgsAttrsUnwrapped; | ||
in | ||
{ | ||
latest-unwrapped = lib.last pkgsList; | ||
latest = (lib.last pkgsList).wrapped; | ||
} | ||
// pkgsAttrs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
wrapCCWith, | ||
overrideCC, | ||
zig, | ||
version, | ||
src, | ||
}: | ||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "arocc"; | ||
inherit version src; | ||
|
||
nativeBuildInputs = [ zig.hook ]; | ||
|
||
passthru = { | ||
inherit zig; | ||
isArocc = true; | ||
wrapped = wrapCCWith { cc = finalAttrs.finalPackage; }; | ||
stdenv = overrideCC stdenv finalAttrs.passthru.wrapped; | ||
}; | ||
|
||
meta = { | ||
description = "C compiler written in Zig."; | ||
homepage = "http://aro.vexu.eu/"; | ||
license = with lib.licenses; [ | ||
mit | ||
unicode-30 | ||
]; | ||
maintainers = with lib.maintainers; [ RossComputerGuy ]; | ||
mainProgram = "arocc"; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters