uqm: Fix evaluation of 3DO video package

Regression introduced by 2e34288f0d.

The commit in question just used the "lib" attribute, but it wasn't in
scope. In addition to bringeng the lib attribute into scope, I also
removed the "with lib;", which should make sure that we get an error
when just parsing (nix-instantiate --parse) the Nix expression.

Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
aszlig 2021-01-24 15:35:12 +01:00
parent 9e9e240a27
commit 2f30e32121
No known key found for this signature in database
GPG Key ID: 684089CE67EBB691
2 changed files with 4 additions and 6 deletions

View File

@ -1,10 +1,8 @@
{ stdenv, requireFile, writeText, fetchurl, haskellPackages }:
with lib;
{ stdenv, lib, requireFile, writeText, fetchurl, haskellPackages }:
let
makeSpin = num: let
padded = (optionalString (lessThan num 10) "0") + toString num;
padded = (lib.optionalString (lib.lessThan num 10) "0") + toString num;
in "slides.spins.${padded} = 3DOVID:" +
"addons/3dovideo/spins/ship${padded}.duk:" +
"addons/3dovideo/spins/spin.aif:" +
@ -13,7 +11,7 @@ let
videoRMP = writeText "3dovideo.rmp" (''
slides.ending = 3DOVID:addons/3dovideo/ending/victory.duk
slides.intro = 3DOVID:addons/3dovideo/intro/intro.duk
'' + concatMapStrings makeSpin (range 0 24));
'' + lib.concatMapStrings makeSpin (lib.range 0 24));
helper = with haskellPackages; mkDerivation {
pname = "uqm3donix";

View File

@ -12,7 +12,7 @@ assert use3DOVideos -> requireFile != null && writeText != null
let
videos = import ./3dovideo.nix {
inherit stdenv requireFile writeText fetchurl haskellPackages;
inherit stdenv lib requireFile writeText fetchurl haskellPackages;
};
remixPacks = lib.imap1 (num: sha256: fetchurl rec {