about summary refs log tree commit diff
path: root/pkgs/games/planetaryannihilation
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2022-01-11 13:50:16 +0100
committerFelix Buehler <account@buehler.rocks>2022-01-17 19:09:37 +0100
commit4a403f9e3392ae10b61ff137663e736be2baf638 (patch)
treeb0121952d93f442ee5649cb6ce0b4699e2160812 /pkgs/games/planetaryannihilation
parent1ea75adb020b250a8459b6cadcb66543b6c1e217 (diff)
treewide: rename name to pname&version
Diffstat (limited to 'pkgs/games/planetaryannihilation')
-rw-r--r--pkgs/games/planetaryannihilation/default.nix25
1 files changed, 7 insertions, 18 deletions
diff --git a/pkgs/games/planetaryannihilation/default.nix b/pkgs/games/planetaryannihilation/default.nix
index c29af6d810f5f..2debd15f814eb 100644
--- a/pkgs/games/planetaryannihilation/default.nix
+++ b/pkgs/games/planetaryannihilation/default.nix
@@ -1,26 +1,15 @@
 { lib, stdenv, config, fetchurl, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk
-, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg }:
+, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg, requireFile }:
 
-# TODO: use dynamic attributes once Nix 1.7 is out
-assert ((config.planetary_annihilation or null).url or null) != null;
-assert ((config.planetary_annihilation or null).sha256 or null) != null;
+stdenv.mkDerivation rec {
+  pname = "planetary-annihalation";
+  version = "62857";
 
-/* to setup:
- $ cat ~/.config/nixpkgs/config.nix
- {
-  planetary_annihilation = {
-    url = "file:///home/user/PA_Linux_62857.tar.bz2";
+  src = requireFile {
+    message = "This file has to be downloaded manually via nix-prefetch-url.";
+    name = "PA_Linux_${version}.tar.bz2";
     sha256 = "0imi3k5144dsn3ka9khx3dj76klkw46ga7m6rddqjk4yslwabh3k";
   };
-}
-*/
-
-stdenv.mkDerivation {
-  name = "planetary-annihalation";
-
-  src = fetchurl {
-    inherit (config.planetary_annihilation) url sha256;
-  };
 
   nativeBuildInputs = [ patchelf makeWrapper ];