From 3c03898977ccbbf9135a5048cf124af2a29fe00c Mon Sep 17 00:00:00 2001 From: rhiannon morris Date: Fri, 4 Apr 2025 23:49:39 +0200 Subject: [PATCH] add ips package --- flake.nix | 5 ++++- haskell/ips.nix | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 haskell/ips.nix diff --git a/flake.nix b/flake.nix index 0adab0e..1d23b9d 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,8 @@ "pragmatapro" "teranoptia" ]; + haskellPackages = packagesInDir "haskell" [ "ips" ]; + makeApp = pkgs: name: exe: { inherit name; @@ -43,7 +45,8 @@ mkPackages = sys: pkgs: ifLinux64 sys (linuxPackages pkgs) // - crossPlatformPackages pkgs // fonts pkgs; + crossPlatformPackages pkgs // fonts pkgs // + haskellPackages pkgs.haskellPackages; mkApps = sys: pkgs: ifLinux64 sys (linuxApps pkgs); in { diff --git a/haskell/ips.nix b/haskell/ips.nix new file mode 100644 index 0000000..4fb84cf --- /dev/null +++ b/haskell/ips.nix @@ -0,0 +1,25 @@ +{ mkDerivation, attoparsec, base, bytestring, fetchgit, lib +, primitive, vector +}: +mkDerivation { + pname = "ips"; + version = "0.1.0"; + src = fetchgit { + url = "https://git.rhiannon.website/rhi/ips.git"; + sha256 = "0qbkbxbyzky8sg2d8737588qpvjlyh2b33d3gj885s3rwl60ff6d"; + rev = "6a8c937d241156ab3b6ac684c2dc5e0fd9648dde"; + fetchSubmodules = true; + }; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + attoparsec base bytestring primitive vector + ]; + executableHaskellDepends = [ + attoparsec base bytestring primitive vector + ]; + homepage = "https://git.rhiannon.website/rhi/ips"; + description = "applies ips patches. remember those?"; + license = lib.licenses.wtfpl; + mainProgram = "ips"; +}