Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
description = "EmuHawk is a multi-system emulator written in C#. As well as quality-of-life features for casual players, it also has recording/playback and debugging tools, making it the first choice for TASers (Tool-Assisted Speedrunners).";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
};
outputs =
inputs@{ self, nixpkgs, ... }:
with builtins;
let
std = nixpkgs.lib;
systems = [
# this is currently the only supported system, according to https://github.com/TASEmulators/BizHawk/issues/1430#issue-396452488
"x86_64-linux"
];
nixpkgsFor = std.genAttrs systems (
system:
import nixpkgs {
localSystem = builtins.currentSystem or system;
crossSystem = system;
overlays = [ ];
}
);
# import the derivations from default.nix for the given system & package set
importDefaultDerivationsWith =
system: pkgs:
# ./default.nix outputs some non-derivation attributes, so we have to filter those out
(std.filterAttrs (name: val: std.isDerivation val) (import ./default.nix { inherit system pkgs; }));
in
{
packages = mapAttrs (
system: pkgs:
(importDefaultDerivationsWith system pkgs)
// {
default = self.packages.${system}.emuhawk-latest-bin;
}
) nixpkgsFor;
devShells = mapAttrs (
system: pkgs:
# ./shell.nix outputs some non-derivation attributes and some extraneous derivations, so we have to filter those out
(std.filterAttrs (
name: val: std.isDerivation val && name != "stdenv" && name != "out" && name != "inputDerivation"
) (import ./shell.nix { inherit system pkgs; }))
// {
default = self.devShells.${system}.emuhawk-latest;
}
) nixpkgsFor;
};
}