1
Fork 0

rename to dashed version

This commit is contained in:
Jan-Erik Rediger 2024-05-16 22:47:23 +02:00
parent 1187ef5fe3
commit 5bcb10eff4
4 changed files with 26 additions and 18 deletions

8
default.nix Normal file
View file

@ -0,0 +1,8 @@
let pkgs = import <nixpkgs> { }; in
rec {
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; };
}

View file

@ -10,11 +10,11 @@
devShells = forAllSystems (system: devShells = forAllSystems (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
hareAs = pkgs.callPackage ./pkgs/hare-as.nix { }; hare-as = pkgs.callPackage ./pkgs/hare-as.nix { };
hareCc = pkgs.callPackage ./pkgs/hare-cc.nix { }; hare-cc = pkgs.callPackage ./pkgs/hare-cc.nix { };
hareLd = pkgs.callPackage ./pkgs/hare-ld.nix { }; hare-ld = pkgs.callPackage ./pkgs/hare-ld.nix { };
harec = pkgs.callPackage ./pkgs/harec.nix { inherit hareAs hareCc hareLd; }; harec = pkgs.callPackage ./pkgs/harec.nix { inherit hare-as hare-cc hare-ld; };
hare = pkgs.callPackage ./pkgs/hare.nix { inherit harec hareAs hareCc hareLd; }; hare = pkgs.callPackage ./pkgs/hare.nix { inherit harec hare-as hare-cc hare-ld; };
in in
{ {
default = pkgs.mkShell { default = pkgs.mkShell {

View file

@ -8,9 +8,9 @@
tzdata, tzdata,
python3, python3,
substituteAll, substituteAll,
hareAs, hare-as,
hareCc, hare-cc,
hareLd, hare-ld,
}: }:
let let
arch = stdenv.hostPlatform.uname.processor; arch = stdenv.hostPlatform.uname.processor;
@ -56,9 +56,9 @@ stdenv.mkDerivation (finalAttrs: {
"ARCH=${arch}" "ARCH=${arch}"
"VERSION=${finalAttrs.version}-nixpkgs" "VERSION=${finalAttrs.version}-nixpkgs"
"QBEFLAGS=-t${qbePlatform}" "QBEFLAGS=-t${qbePlatform}"
"CC=${hareCc}/bin/hare-cc" "CC=${hare-cc}/bin/hare-cc"
"AS=${hareAs}/bin/hare-as" "AS=${hare-as}/bin/hare-as"
"LD=${hareLd}/bin/hare-ld" "LD=${hare-ld}/bin/hare-ld"
# Strip the variable of an empty $(SRCDIR)/hare/third-party, since nix does # Strip the variable of an empty $(SRCDIR)/hare/third-party, since nix does
# not follow the FHS. # not follow the FHS.
"HAREPATH=$(SRCDIR)/hare/stdlib" "HAREPATH=$(SRCDIR)/hare/stdlib"
@ -74,9 +74,9 @@ stdenv.mkDerivation (finalAttrs: {
postFixup = '' postFixup = ''
wrapProgram $out/bin/hare \ wrapProgram $out/bin/hare \
--prefix PATH : ${lib.makeBinPath [harec qbe]} \ --prefix PATH : ${lib.makeBinPath [harec qbe]} \
--set CC ${hareCc}/bin/hare-cc \ --set CC ${hare-cc}/bin/hare-cc \
--set AS ${hareAs}/bin/hare-as \ --set AS ${hare-as}/bin/hare-as \
--set LD ${hareLd}/bin/hare-ld --set LD ${hare-ld}/bin/hare-ld
wrapProgram $out/bin/haredoc \ wrapProgram $out/bin/haredoc \
--prefix PATH : ${lib.makeBinPath [scdoc]} --prefix PATH : ${lib.makeBinPath [scdoc]}

View file

@ -1,4 +1,4 @@
{ stdenv, qbe, hareAs, hareCc, hareLd }: { stdenv, qbe, hare-as, hare-cc, hare-ld }:
let let
arch = stdenv.hostPlatform.uname.processor; arch = stdenv.hostPlatform.uname.processor;
qbePlatform = { qbePlatform = {
@ -23,9 +23,9 @@ stdenv.mkDerivation (finalAttrs: {
"ARCH=${arch}" "ARCH=${arch}"
"VERSION=${finalAttrs.version}-nixpkgs" "VERSION=${finalAttrs.version}-nixpkgs"
"QBEFLAGS=-t${qbePlatform}" "QBEFLAGS=-t${qbePlatform}"
"CC=${hareCc}/bin/hare-cc" "CC=${hare-cc}/bin/hare-cc"
"AS=${hareAs}/bin/hare-as" "AS=${hare-as}/bin/hare-as"
"LD=${hareLd}/bin/hare-ld" "LD=${hare-ld}/bin/hare-ld"
]; ];
postConfigure = '' postConfigure = ''