mirror of
https://github.com/N64Recomp/N64Recomp.git
synced 2025-05-30 23:33:15 +00:00
Add flake.nix, use fixed github commit to get nicer nix commands.
This commit is contained in:
parent
5838e4223a
commit
d5513f791f
3 changed files with 142 additions and 0 deletions
58
flake.nix
Normal file
58
flake.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
description = "Tool to statically recompile N64 games into native executables";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {...}:
|
||||
inputs.flake-utils.lib.eachDefaultSystem
|
||||
(
|
||||
system: let
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in rec {
|
||||
packages = rec {
|
||||
N64Recomp = pkgs.stdenv.mkDerivation {
|
||||
pname = "N64Recomp";
|
||||
version = "1.0.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Mr-Wiseguy";
|
||||
repo = "N64Recomp";
|
||||
rev = "d7b223fde51c651d2e1aa856efaf19793a77e5e7";
|
||||
deepClone = true;
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-TWr6ctsT3VaSRvsTfVBC5sBPCx4b2rvUuuZFUGO6kH4=";
|
||||
};
|
||||
nativeBuildInputs = [pkgs.cmake];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp N64Recomp $out/bin
|
||||
cp RSPRecomp $out/bin
|
||||
'';
|
||||
};
|
||||
default = N64Recomp;
|
||||
};
|
||||
apps = rec {
|
||||
N64Recomp = {
|
||||
type = "app";
|
||||
program = "${packages.N64Recomp}/bin/N64Recomp";
|
||||
};
|
||||
|
||||
RSPRecomp = {
|
||||
type = "app";
|
||||
program = "${packages.N64Recomp}/bin/RSPRecomp";
|
||||
};
|
||||
default = N64Recomp;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue