main
xenia 2024-02-01 20:54:27 +01:00
parent f8e2fa453b
commit f537f9a2d8
3 changed files with 155 additions and 0 deletions

1
.envrc 100644
View File

@ -0,0 +1 @@
use flake

126
flake.lock 100644
View File

@ -0,0 +1,126 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fox32asm": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1706972401,
"narHash": "sha256-HrbsibEnxC8va3LJhA6B8fDabxFRcmTk1or2pOKxlYo=",
"ref": "refs/heads/main",
"rev": "bfd40db93b6cc5ec67517286e6c32a5bd8ecc702",
"revCount": 67,
"type": "git",
"url": "https://githug.xyz/xenia/fox32asm"
},
"original": {
"type": "git",
"url": "https://githug.xyz/xenia/fox32asm"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1697009197,
"narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1697009197,
"narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"fox32asm": "fox32asm",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

28
flake.nix 100644
View File

@ -0,0 +1,28 @@
{
description = "fox32rom";
inputs = {
fox32asm.url = "git+https://githug.xyz/xenia/fox32asm";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, fox32asm, flake-utils }:
flake-utils.lib.eachDefaultSystem (sys:
let pkgs = nixpkgs.legacyPackages.${sys};
asm = fox32asm.packages.${sys}.default;
fox32rom = pkgs.runCommand "fox32rom" {} ''
cp -r ${./.}/* ./
mkdir -p $out/bin
${asm}/bin/fox32asm ./main.asm $out/bin/fox32.rom
'';
in rec {
packages.fox32rom = fox32rom;
packages.default = fox32rom;
devShells.default = pkgs.mkShell {
packages = [ asm ];
};
}
);
}