diff options
author | Naïm Favier <n@monade.li> | 2023-12-06 11:41:15 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2023-12-06 11:41:15 +0100 |
commit | 272fa4a1c04e1bb052abb40fe224704508d2c1f7 (patch) | |
tree | f55e70390884085f192e414eaedacf1da01167b9 /pkgs/development/haskell-modules/configuration-common.nix | |
parent | a56afd860cac7a59d5261581410e109a3c67604b (diff) |
haskellPackages: refactor csound overrides
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-common.nix')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 103 |
1 files changed, 56 insertions, 47 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 0d49c7f1256dd..56d30f78ddae7 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -14,12 +14,6 @@ let inherit (pkgs) fetchpatch fetchpatch2 lib; inherit (lib) throwIfNot versionOlder versions; - csound_src_git = pkgs.fetchFromGitHub { - owner = "spell-music"; - repo = "csound-expression"; - rev = "345df2c91c9831dd895f58951990165598504814"; - hash = "sha256-6qPiKsZwZpqB2kmckKDKyQPTcWPIaVwi+EYs74tRod0="; - }; in with haskellLib; @@ -924,47 +918,62 @@ self: super: { ''; }) super.structured-haskell-mode; - # Compilation on recent GHC is fixed on git, but not yet on hackage - # https://github.com/spell-music/csound-expression/pull/68 - csound-expression-typed = - assert super.csound-expression-typed.version == "0.2.7"; - overrideCabal (drv: { - src = csound_src_git + "/csound-expression-typed"; - editedCabalFile = null; - }) super.csound-expression-typed; - - csound-expression-dynamic = - assert super.csound-expression-dynamic.version == "0.3.9"; - overrideCabal (drv: { - src = csound_src_git + "/csound-expression-dynamic"; - editedCabalFile = null; - libraryHaskellDepends = drv.libraryHaskellDepends ++ [ - self.base64-bytestring self.cereal self.cereal-text - self.cryptohash-sha256 self.pretty-show self.safe - self.unordered-containers self.vector self.wl-pprint-text - ]; - }) super.csound-expression-dynamic; - - csound-expression = - assert super.csound-expression.version == "5.4.3"; - overrideCabal (drv: { - src = csound_src_git + "/csound-expression"; - editedCabalFile = null; - }) super.csound-expression; - - csound-expression-opcodes = - assert super.csound-expression-opcodes.version == "0.0.5.1"; - overrideCabal (drv: { - src = csound_src_git + "/csound-expression-opcodes"; - editedCabalFile = null; - }) super.csound-expression-opcodes; - - csound-sampler = - assert super.csound-sampler.version == "0.0.10.1"; - overrideCabal (drv: { - src = csound_src_git + "/csound-sampler"; - editedCabalFile = null; - }) super.csound-sampler; + inherit (let + csound_src_git = pkgs.fetchFromGitHub { + owner = "spell-music"; + repo = "csound-expression"; + rev = "345df2c91c9831dd895f58951990165598504814"; + hash = "sha256-6qPiKsZwZpqB2kmckKDKyQPTcWPIaVwi+EYs74tRod0="; + }; + in { + # Compilation on recent GHC is fixed on git, but not yet on hackage + # https://github.com/spell-music/csound-expression/pull/68 + csound-expression-typed = + assert super.csound-expression-typed.version == "0.2.7"; + overrideCabal (drv: { + src = csound_src_git + "/csound-expression-typed"; + editedCabalFile = null; + }) super.csound-expression-typed; + + csound-expression-dynamic = + assert super.csound-expression-dynamic.version == "0.3.9"; + overrideCabal (drv: { + src = csound_src_git + "/csound-expression-dynamic"; + editedCabalFile = null; + libraryHaskellDepends = drv.libraryHaskellDepends ++ [ + self.base64-bytestring self.cereal self.cereal-text + self.cryptohash-sha256 self.pretty-show self.safe + self.unordered-containers self.vector self.wl-pprint-text + ]; + }) super.csound-expression-dynamic; + + csound-expression = + assert super.csound-expression.version == "5.4.3"; + overrideCabal (drv: { + src = csound_src_git + "/csound-expression"; + editedCabalFile = null; + }) super.csound-expression; + + csound-expression-opcodes = + assert super.csound-expression-opcodes.version == "0.0.5.1"; + overrideCabal (drv: { + src = csound_src_git + "/csound-expression-opcodes"; + editedCabalFile = null; + }) super.csound-expression-opcodes; + + csound-sampler = + assert super.csound-sampler.version == "0.0.10.1"; + overrideCabal (drv: { + src = csound_src_git + "/csound-sampler"; + editedCabalFile = null; + }) super.csound-sampler; + }) + csound-expression-typed + csound-expression-dynamic + csound-expression + csound-expression-opcodes + csound-sampler + ; # Make elisp files available at a location where people expect it. hindent = (overrideCabal (drv: { |