From e91485c0af1308a68d580343eb5e135833bcad00 Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Sat, 18 May 2024 01:50:05 -0400 Subject: [PATCH] Add `irdkit` and `ird_tools` to my packages again. --- home/packages/ird_tools/package.nix | 46 +++++++++++++++++ home/packages/irdkit/deps.nix | 78 +++++++++++++++++++++++++++++ home/packages/irdkit/package.nix | 38 ++++++++++++++ home/pkgs_and_programs.nix | 19 +++++-- 4 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 home/packages/ird_tools/package.nix create mode 100644 home/packages/irdkit/deps.nix create mode 100644 home/packages/irdkit/package.nix diff --git a/home/packages/ird_tools/package.nix b/home/packages/ird_tools/package.nix new file mode 100644 index 0000000..4364ee7 --- /dev/null +++ b/home/packages/ird_tools/package.nix @@ -0,0 +1,46 @@ +{ + lib, + fetchFromGitHub, + gcc13Stdenv, + makeWrapper, + zlib, + glibc, +}: + +gcc13Stdenv.mkDerivation { + pname = "ird_tools"; + version = "v0.7"; + + src = fetchFromGitHub { + name = "ird_tools"; + owner = "Zarh"; + repo = "ird_tools"; + rev = "9489afc0979715a86fbfb6b5a9a93330863505eb"; + hash = "sha256-1m243bPabo2riOInblDggqTniXg1f16UqeLXJfEBrf4="; + }; + + nativeBuildInputs = [ makeWrapper glibc.static zlib.static zlib.dev ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp ird_tools $out/bin + runHook postInstall + ''; + + meta = { + homepage = "https://github.com/Zarh/ird_tools"; + description = "DESCRIPTION PLACEHOLDER"; + longDescription = "DESCRIPTION PLACEHOLDER"; + license = lib.licenses.gpl3; + # license = lib.licenses.unfree; + # Dev feels that it should be GPLv3, but doesn't have a `LICENSE` file in + # the repository "proving" the licensing. Running with it for now. + # Info on this: https://github.com/Zarh/ird_tools/issues/3 + # Keeping `lib.licenses.unfree` license comment just to make sure I + # remember + maintainers = with lib.maintainers; [ ]; + mainProgram = "ird_tools"; + platforms = lib.platforms.linux; + }; +} diff --git a/home/packages/irdkit/deps.nix b/home/packages/irdkit/deps.nix new file mode 100644 index 0000000..da31a02 --- /dev/null +++ b/home/packages/irdkit/deps.nix @@ -0,0 +1,78 @@ +# This file was automatically generated by passthru.fetch-deps. +# Please dont edit it manually, your changes might get overwritten! + +{ fetchNuGet }: [ + (fetchNuGet { pname = "CommandLineParser"; version = "2.9.1"; sha256 = "1sldkj8lakggn4hnyabjj1fppqh50fkdrr1k99d4gswpbk5kv582"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "3.1.10"; sha256 = "0xn4zh7shvijqlr03fqsmps6gz856isd9bg9rk4z2c4599ggal77"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "5.0.0"; sha256 = "0d7sjr89zwq0wxirf8la05hfalv9nhvlczg1c7a508k8aw79jvfg"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "6.0.27"; sha256 = "11sfm0vb8grybwdfzl9y3y1v9jg94rn3fpsf0995xm1qgk57piiv"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Ref"; version = "7.0.16"; sha256 = "1nrk00w3jkb1r3m8zn7c05snan02b6s7n5s93aq2dl9kz0bm530c"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "3.1.32"; sha256 = "00ha2sl4gvqv68mbrsizd6ngqy0vv6vamngzjxr338k1w7a276dx"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "5.0.17"; sha256 = "183xgqzlwd5lhacxdwcjl8vcq7r7xypv0hddps9k32mmmwf83d8h"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "6.0.27"; sha256 = "078vz7l3sw25jxkhxf646hwc1csasna4n04rjq6vcv30c9kx3lp9"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "7.0.16"; sha256 = "0g4zxka97q3bdc72yql296hx2laim5b4rfb8vxmknzdpzj0ydiks"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "3.1.32"; sha256 = "0ywz63q8vrdp25ix2j9b7h2jp5grc68hqfl64c6lqk26q9xwhp9r"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "5.0.17"; sha256 = "066fwdlssbv556zd9w1x87x1j8j4kafj9rxyy0692bssdb4gcyc8"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.27"; sha256 = "0cdvdbvvbky0y60732j2n2jjycgpm2ngx38hl6zq198xm1d4g43x"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "7.0.16"; sha256 = "0zy1zarikg4d1g06ax3zdjvfysw2393b9fgg7xnracqi17hr38ah"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "6.0.27"; sha256 = "11l2a80xxinf08m9i6jdy0nkjpdjs9llqb8gs7x0762cnyhds7la"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-arm64"; version = "7.0.16"; sha256 = "1wgmbbn81rbqlx44hg9zqrrcmiinss1qhgfsq37vzy2i8ycyn59w"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "3.1.32"; sha256 = "1crk54a1wvj76s9gnh46pi7wk8ryympm9xh2jq4s4rpp329fqgic"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "5.0.17"; sha256 = "1qvvqf8mmzzc7a7fhx324dprnbxhknr3qxspb2xhsn3yyg44xn2d"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "6.0.27"; sha256 = "0r7qqwkqm9lraqwc25aadbg856v006h17yj8cxmp800iz7288k07"; }) + (fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.osx-x64"; version = "7.0.16"; sha256 = "1ggcy57k31bxqk6k1hsbmzxkyly9bzch7dw7fgl2yx4a439nkh54"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "3.1.32"; sha256 = "1zygp70xrk5zggs3q4a6yc6jfdwzcsjjsapqpwn6qyx35m69b72p"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "5.0.17"; sha256 = "07v7vyqm556xr1ypkazfp6gh6drgf20zkwbhkpja8bwdcr6lphbb"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "6.0.27"; sha256 = "0p0apwm7xpwwvjl453livb8ngvc0izjp5yfpgv116vhig2mxszsa"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-arm64"; version = "7.0.16"; sha256 = "0wxa2mm34l32324rywns3bphxrkxm265wxck93z030klwvxdalri"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "3.1.32"; sha256 = "08sar3s7j6z1q5prjmz2jrbsq5ms81mrsi1c1zbfrkplkfjpld3a"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "5.0.17"; sha256 = "1lc2jhr4ikffi5ylyf8f6ya6k0hdj0wp1l0017grrwd4m5ajj4vv"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "6.0.27"; sha256 = "1vglh2l7brp6qbdngiiwsjwsp3cyzbzjcjw7dwqhfk0whc7n96kg"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.linux-x64"; version = "7.0.16"; sha256 = "1xiq43br5lk1xa4d4wzhdpn9lz3mixmyxggzbsf4i4q5692rv35f"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "6.0.27"; sha256 = "14zd7mgl866bhqqrcb6q3xbwrllks1nmfzhnbm8rf7h5cqqrqwbn"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-arm64"; version = "7.0.16"; sha256 = "0ln013191h2rkhm8xss4aqbb52ywp44rjfnn7pip99wdx66bkazs"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "3.1.32"; sha256 = "186gjn8sbhp4z6pq8fw4g8nqk9dwyaplwvdz2y3fbbvg36lggsh0"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "5.0.17"; sha256 = "02g5w41ivrw3n6cy3l3ixhcl8bw1fsv4bzs2m34k9h5fqmliaf3c"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "6.0.27"; sha256 = "1kf3sm7hkqz5a4y5rb49yna10041f1h3lcqx885xlbhyb4q67gi9"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Host.osx-x64"; version = "7.0.16"; sha256 = "1b8w278n8hcxysjs56ghx4pdbfall66nnmk1kx5a0my7lp7yp6xf"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "3.1.0"; sha256 = "08svsiilx9spvjamcnjswv0dlpdrgryhr3asdz7cvnl914gjzq4y"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "5.0.0"; sha256 = "1p62khf9zk23lh91lvz7plv3g1nzmm3b5szqrcm6mb8w3sjk03wi"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "6.0.27"; sha256 = "15fwbjq2r406fq175j2lsh4f91iiipmvaq96nsba3q2fh0c433zm"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Ref"; version = "7.0.16"; sha256 = "19lnkab2p8nkfc4jag0whkv51v3qabwdyzjk6xgj61i6s8lnnz1f"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "3.1.32"; sha256 = "13pcn74z1swz73s72zjl07f118j35wacnzgk7kbjqn83nwgqdgvq"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "5.0.17"; sha256 = "16whaq82pj6fqa0vam3a0va9ly843aa1z12hza040vn6252kk9fq"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "6.0.27"; sha256 = "1dxvssf7rx05bipj03g8jm36j2mmdm13sg8rdwn6aa6whbwpip0r"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-arm64"; version = "7.0.16"; sha256 = "1qb3pk1kgvwjc2n4kqfx4bqjmaihjf8cd9cfkqkkwmnnw9jd7f83"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "3.1.32"; sha256 = "0mmc57dl8plrspdxwb7209wz29vhiwqds4nfbdfws7zg35yy70c7"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "5.0.17"; sha256 = "0jgcfs3jc98jfyaaamssznckbpnaygplk8pjsp6dswpansz5bnnq"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "6.0.27"; sha256 = "1j913pm78h35kvcm70276cnfvjn1r7r6jsc3jm1y0vb395qy6nfd"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.linux-x64"; version = "7.0.16"; sha256 = "1w41xwdikkyplxr1kqfn1fwjvbglgsaripgdglhdx9qdxgr3nfi3"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "6.0.27"; sha256 = "1mbjbj9c7sxw0hfq25ypv56hi9kik3vrrvr8ika3wcwv1ilpvczj"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-arm64"; version = "7.0.16"; sha256 = "0xgd5nj5nx3w3m9cbh3b6r0c2w5svxjkslwqq35w445vjhq435fz"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "3.1.32"; sha256 = "06bk39zcv27cwshjsxfg5d6wzkkzdhfk08sipdc7mr1s8pk7ihi1"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "5.0.17"; sha256 = "1ph5kx18syinp8bpzw80bgq3njl65gwzws727xcmxnysgm7snmjp"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "6.0.27"; sha256 = "0dr1y76wgkqnkjxk5m8ps2g086sn4kp3a04v0ynarw5j0cipg994"; }) + (fetchNuGet { pname = "Microsoft.NETCore.App.Runtime.osx-x64"; version = "7.0.16"; sha256 = "0mghc3ihk2j60yyrb57k200ddmhj5impl81lldpxxx9821pb0qha"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies"; version = "1.0.3"; sha256 = "0hc4d4d4358g5192mf8faijwk0bpf9pjwcfd3h85sr67j0zhj6hl"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net20"; version = "1.0.3"; sha256 = "1s65wgj49mikq4y16yqyff315qkgm84zvjd8ymqdx39kxizrjx3z"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net35"; version = "1.0.3"; sha256 = "1ybq6l7lf6n4w8x54k8s9c1nx1dlzijx9ysply8hsrw8388mcqdi"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net40"; version = "1.0.3"; sha256 = "1566qd1s2p7l5bjlmb05axd1zs35284ivmynjn9zgjk13c5f5mjl"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net452"; version = "1.0.3"; sha256 = "1hicvqqf0s7xxry8caxw6nhvhncr5b814a6i43q0kvh3dwafwcs5"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net462"; version = "1.0.3"; sha256 = "08bfss2p262d8zj41xqndv0qgvz9lq636k2xhl80jl23ay22lsgf"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net472"; version = "1.0.3"; sha256 = "0z7mpiljkqjw1qi5zapv7mg9pyfyzlgmil34j4wi3y9r19bsb87z"; }) + (fetchNuGet { pname = "Microsoft.NETFramework.ReferenceAssemblies.net48"; version = "1.0.3"; sha256 = "18h4265rn5dy5d1igddsz1ilygcyyj4id4cn2qsr3sz7722k8zla"; }) + (fetchNuGet { pname = "MinAsyncBridge"; version = "0.12.4"; sha256 = "1xqiz0p9rz8kqdhi2h9gysvpfcg88vj2w4yi9ryf6205fxzra167"; }) + (fetchNuGet { pname = "MinTasksExtensionsBridge"; version = "0.3.4"; sha256 = "0h69035ahcgc6h8y2qgdwi63c57rfi66nf5rjn4gqa0m76x61y8x"; }) + (fetchNuGet { pname = "MinThreadingBridge"; version = "0.11.4"; sha256 = "0x9xsdjma7jf6m5z08y7fkp9xsk52zfjh8cdkmvjn396bwwql681"; }) + (fetchNuGet { pname = "Net30.LinqBridge"; version = "1.3.0"; sha256 = "1i1dfksllqi84552ipbk863m2wxgp4kvsjkybkcygp8iv0pw4yqk"; }) + (fetchNuGet { pname = "Net35.Actions"; version = "1.1.0"; sha256 = "0w86r4z58amb7yabk2jwx3qz038x9iqr7iwc5qc58f2svab9lv8y"; }) + (fetchNuGet { pname = "Newtonsoft.Json"; version = "13.0.3"; sha256 = "0xrwysmrn4midrjal8g2hr1bbg38iyisl0svamb11arqws4w2bw7"; }) + (fetchNuGet { pname = "SabreTools.Hashing"; version = "1.1.4"; sha256 = "14qv1yallxqgd765ib65r7nsy8h6hlfb9lpl15k0q3qwwnkhkf9f"; }) + (fetchNuGet { pname = "SabreTools.Models"; version = "1.3.0"; sha256 = "16jmg6cjilwf0brra7mwv91wylhfyrv5d3iz6vnfjca35mhzqxma"; }) + (fetchNuGet { pname = "SabreTools.RedumpLib"; version = "1.3.4"; sha256 = "1xp74va7893aa94gaz2v2ws1wjn3011cfpcp00gd6c5x6hpz1qjs"; }) + (fetchNuGet { pname = "System.Buffers"; version = "4.5.1"; sha256 = "04kb1mdrlcixj9zh1xdi5as0k0qi8byr5mi3p3jcxx72qz93s2y3"; }) + (fetchNuGet { pname = "System.IO.Hashing"; version = "8.0.0"; sha256 = "1hg5i9hiihj9x4d0mlvhfddmivzrhzz83dyh26fqw1nd8jvqccxk"; }) + (fetchNuGet { pname = "System.Memory"; version = "4.5.5"; sha256 = "08jsfwimcarfzrhlyvjjid61j02irx6xsklf32rv57x2aaikvx0h"; }) + (fetchNuGet { pname = "System.Numerics.Vectors"; version = "4.5.0"; sha256 = "1kzrj37yzawf1b19jq0253rcs8hsq1l2q8g69d7ipnhzb0h97m59"; }) + (fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.3"; sha256 = "1afi6s2r1mh1kygbjmfba6l4f87pi5sg13p4a48idqafli94qxln"; }) +] diff --git a/home/packages/irdkit/package.nix b/home/packages/irdkit/package.nix new file mode 100644 index 0000000..a1b53ec --- /dev/null +++ b/home/packages/irdkit/package.nix @@ -0,0 +1,38 @@ +{ lib, + buildDotnetModule, + dotnetCorePackages, + fetchFromGitHub +}: + +buildDotnetModule { + pname = "libird"; + version = "0.9.2"; + # NuGet page: https://www.nuget.org/packages/LibIRD + # NuGet version used there as of 2024-02-07 is 0.4.3 + + src = fetchFromGitHub { + owner = "Deterous"; + repo = "LibIRD"; + rev = "82d53db68f610d9cb972efa0dacb1c85a363880a"; + hash = "sha256-QPpS+zxH0fFoMGNA1AraqOseRaYJS+s67IGHKB6n2ig="; + fetchSubmodules = true; + leaveDotGit = false; + }; + + dotnet-sdk = dotnetCorePackages.sdk_8_0; + dotnet-runtime = dotnetCorePackages.runtime_8_0; + nugetDeps = ./deps.nix; + projectFile = "IRDKit/IRDKit.csproj"; + selfContainedBuild = false; + dotnetBuildFlags = [ "--framework net8.0" ]; + dotnetInstallFlags = [ "--framework net8.0" ]; + + meta = { + description = "Placeholder :)"; + homepage = "https://github.com/Deterous/LibIRD"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ ]; + mainProgram = "irdkit"; + platforms = lib.platforms.all; + }; +} diff --git a/home/pkgs_and_programs.nix b/home/pkgs_and_programs.nix index 72095d5..a5967b4 100644 --- a/home/pkgs_and_programs.nix +++ b/home/pkgs_and_programs.nix @@ -5,6 +5,16 @@ xil, ... }: +let + + my_packages = { + irdkit = callPackage ./packages/irdkit/package.nix {}; + ird_tools = callPackage ./packages/ird_tools/package.nix {}; + # rom-properties = callPackage ./home/packages/rom-properties/package.nix {}; + }; + callPackage = pkgs.callPackage; + +in { programs = { bat = { @@ -59,9 +69,10 @@ theme = "bira"; }; }; - }; + + # The home.packages option allows you to install Nix packages into your # environment. @@ -96,9 +107,9 @@ pkgs.xxd pkgs.yq - # my_pkgs.irdkit - # my_pkgs.ird_tools - # my_pkgs.rom-properties + my_packages.irdkit + my_packages.ird_tools + # my_packages.rom-properties agenix.packages.${system}.default xil.packages.${system}.xil