nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, fetchurl
4, installShellFiles
5}:
6
7stdenv.mkDerivation (finalAttrs: {
8 pname = "dxa";
9 version = "0.1.5";
10
11 src = fetchurl {
12 urls = [
13 "https://www.floodgap.com/retrotech/xa/dists/dxa-${finalAttrs.version}.tar.gz"
14 "https://www.floodgap.com/retrotech/xa/dists/unsupported/dxa-${finalAttrs.version}.tar.gz"
15 ];
16 hash = "sha256-jkDtd4FlgfmtlaysLtaaL7KseFDkM9Gc1oQZOkWCZ5k=";
17 };
18
19 nativeBuildInputs = [ installShellFiles ];
20
21 dontConfigure = true;
22
23 postPatch = ''
24 substituteInPlace Makefile \
25 --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc"
26 '';
27
28 installPhase = ''
29 runHook preInstall
30
31 install -Dm755 -T dxa $out/bin/dxa
32 installManPage dxa.1
33
34 runHook postInstall
35 '';
36
37 meta = {
38 homepage = "https://www.floodgap.com/retrotech/xa/";
39 description = "Andre Fachat's open-source 6502 disassembler";
40 license = lib.licenses.gpl2Plus;
41 maintainers = with lib.maintainers; [ AndersonTorres ];
42 platforms = with lib.platforms; unix;
43 };
44})