Fix derivation

This commit is contained in:
2024-04-16 15:06:51 +02:00
parent 3dd766efdb
commit d9b6dea879
4 changed files with 29 additions and 29 deletions

3
.gitmodules vendored
View File

@@ -1,6 +1,3 @@
[submodule "libjade"] [submodule "libjade"]
path = libjade path = libjade
url = https://github.com/Rixxc/libjade.git url = https://github.com/Rixxc/libjade.git
[submodule "jasmin"]
path = jasmin
url = https://github.com/Rixxc/jasmin.git

View File

@@ -1,8 +1,8 @@
JC ?= jasmin/compiler/jasminc JC ?= jasminc
CC ?= gcc CC ?= gcc
MAKE ?= make MAKE ?= make
.PHONY: clean run $(JC) .PHONY: clean run
all: build all: build
@true @true
@@ -16,10 +16,7 @@ build/%.o: build/%.S
clean: clean:
rm build/* 2> /dev/null || true rm build/* 2> /dev/null || true
$(JC): build/%.S: src/%.jazz
nix-shell jasmin/default.nix --command 'make -C jasmin/compiler CIL -j$(nproc) && make -C jasmin/compiler'
build/%.S: src/%.jazz $(JC)
JASMINPATH="Jade=libjade/src/" $(JC) $< -o $@ JASMINPATH="Jade=libjade/src/" $(JC) $< -o $@
syscall/jasmin_syscall.o: syscall/jasmin_syscall.c syscall/jasmin_syscall.h syscall/jasmin_syscall.o: syscall/jasmin_syscall.c syscall/jasmin_syscall.h

View File

@@ -1,15 +1,22 @@
{ pkgs ? import <nixpkgs> { } }: { pkgs ? import <nixpkgs> { } }:
with pkgs; with pkgs;
# let let
# jasmin-src = fetchFromGitHub { jasmin-src = fetchFromGitHub {
# owner = "jasmin-lang"; owner = "Rixxc";
# repo = "jasmin"; repo = "jasmin";
# rev = "9bb6340fe0e3c5d78ea3957f6c5c3564c3424770"; rev = "244d42d2a8c37d7607abf7dd5e92eddd2c339340";
# hash = "sha256-EVwnD6dZLTy9MgR6gdymhg3Ipudpj1mchDlMpCAdITE="; hash = "sha256-EDLsFsRZmSzei2LvgJfI6W+DiErnfrwO7ciom/1+6BQ=";
# }; };
#
# jasmin = callPackage "${jasmin-src}/default.nix" { inherit pkgs; }; jasmin-drv = callPackage "${jasmin-src}/default.nix" { inherit pkgs; };
# in jasmin = jasmin-drv.overrideAttrs {
name = "jasmin with syscalls";
buildPhase = ''
make -C compiler/ CIL
make -C compiler/
'';
};
in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "x25519-agent"; name = "x25519-agent";
src = nix-gitignore.gitignoreSource [ ] ./.; src = nix-gitignore.gitignoreSource [ ] ./.;
@@ -17,15 +24,15 @@ stdenv.mkDerivation {
nativeBuildInputs = [ nativeBuildInputs = [
gnumake gnumake
gcc gcc
# jasmin jasmin
]; ];
# configurePhase = '' configurePhase = ''
# mkdir build mkdir build
# ''; '';
#
# installPhase = '' installPhase = ''
# mkdir -p $out/lib mkdir -p $out/lib
# cp build/libagent.a $out/lib cp build/libagent.a $out/lib
# ''; '';
} }

1
jasmin

Submodule jasmin deleted from 244d42d2a8