1
Fork 0

move mac hare input to flake input

This commit is contained in:
Jan-Erik Rediger 2024-06-02 00:06:43 +02:00
parent 1a47f9de85
commit 105f21f90b
4 changed files with 52 additions and 14 deletions

View file

@ -1,5 +1,37 @@
{
"nodes": {
"hare-src": {
"flake": false,
"locked": {
"lastModified": 1717279340,
"narHash": "sha256-c91H21fyzHVekAB5ePduxO8l/zZ86ov8KHa1HHC8Ywc=",
"owner": "badboy",
"repo": "harelang",
"rev": "287006499c2640c6e96b6fa5e0c99a2c193cc666",
"type": "github"
},
"original": {
"owner": "badboy",
"repo": "harelang",
"type": "github"
}
},
"harec-src": {
"flake": false,
"locked": {
"lastModified": 1715770447,
"narHash": "sha256-/n175ocvtzi1J+zB8+eW69YXolGFX15g9Ee0OE5jtGA=",
"owner": "badboy",
"repo": "harelang-harec",
"rev": "873311b721dca691706909964cc108139ebee0de",
"type": "github"
},
"original": {
"owner": "badboy",
"repo": "harelang-harec",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1716220750,
@ -16,6 +48,8 @@
},
"root": {
"inputs": {
"hare-src": "hare-src",
"harec-src": "harec-src",
"nixpkgs": "nixpkgs"
}
}

View file

@ -1,7 +1,18 @@
{
description = "Hare for mac";
outputs = { nixpkgs, ... }:
inputs = {
harec-src = {
url = "github:badboy/harelang-harec";
flake = false;
};
hare-src = {
url = "github:badboy/harelang";
flake = false;
};
};
outputs = { nixpkgs, harec-src, hare-src, ... }:
let
supportedSystems = [ "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
@ -13,8 +24,8 @@
hare-as = pkgs.callPackage ./pkgs/hare-as.nix { };
hare-cc = pkgs.callPackage ./pkgs/hare-cc.nix { };
hare-ld = pkgs.callPackage ./pkgs/hare-ld.nix { };
harec = pkgs.callPackage ./pkgs/harec.nix { inherit hare-as hare-cc hare-ld; };
hare = pkgs.callPackage ./pkgs/hare.nix { inherit harec hare-as hare-cc hare-ld; };
harec = pkgs.callPackage ./pkgs/harec.nix { inherit harec-src hare-as hare-cc hare-ld; };
hare = pkgs.callPackage ./pkgs/hare.nix { inherit hare-src harec hare-as hare-cc hare-ld; };
in
{
default = pkgs.mkShell {

View file

@ -8,6 +8,7 @@
tzdata,
python3,
substituteAll,
hare-src,
hare-as,
hare-cc,
hare-ld,
@ -22,11 +23,7 @@ in
stdenv.mkDerivation (finalAttrs: {
pname = "hare";
version = "0.24";
src = builtins.fetchGit {
url = "https://github.com/badboy/harelang";
ref = "master";
rev = "287006499c2640c6e96b6fa5e0c99a2c193cc666";
};
src = hare-src;
doCheck = true;
patches = [

View file

@ -1,4 +1,4 @@
{ stdenv, qbe, hare-as, hare-cc, hare-ld }:
{ stdenv, qbe, harec-src, hare-as, hare-cc, hare-ld }:
let
arch = stdenv.hostPlatform.uname.processor;
qbePlatform = {
@ -9,11 +9,7 @@ in
stdenv.mkDerivation (finalAttrs: {
pname = "harec";
version = "0.24";
src = builtins.fetchGit {
url = "https://github.com/badboy/harelang-harec";
ref = "master";
rev = "873311b721dca691706909964cc108139ebee0de";
};
src = harec-src;
buildInputs = [ qbe ];
nativeBuildInputs = [ qbe ];
doCheck = true;