mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
54 lines
1.9 KiB
Nix
54 lines
1.9 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "clean";
|
|
version = "3.0";
|
|
|
|
src =
|
|
if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
|
|
url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_32_boot.tar.gz";
|
|
sha256 = "0cjxv3vqrg6pz3aicwfdz1zyhk0q650464j3qyl0wzaikh750010";
|
|
})
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
|
|
url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_64_boot.tar.gz";
|
|
sha256 = "06k283y9adbi28f78k3m5ssg6py73qqkz3sm8dgxc89drv4krl2i";
|
|
})
|
|
else throw "Architecture not supported";
|
|
|
|
hardeningDisable = [ "format" "pic" ];
|
|
|
|
# clm uses timestamps of dcl, icl, abc and o files to decide what must be rebuild
|
|
# and for chroot builds all of the library files will have equal timestamps. This
|
|
# makes clm try to rebuild the library modules (and fail due to absence of write permission
|
|
# on the Nix store) every time any file is compiled.
|
|
patches = [ ./chroot-build-support-do-not-rebuild-equal-timestamps.patch ];
|
|
|
|
preBuild = ''
|
|
substituteInPlace Makefile --replace 'INSTALL_DIR = $(CURRENTDIR)' 'INSTALL_DIR = '$out
|
|
|
|
substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/gcc' $(type -p gcc)
|
|
substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/as' $(type -p as)
|
|
|
|
cd src
|
|
'';
|
|
|
|
postBuild = ''
|
|
cd ..
|
|
'';
|
|
|
|
meta = {
|
|
description = "General purpose, state-of-the-art, pure and lazy functional programming language";
|
|
longDescription = ''
|
|
Clean is a general purpose, state-of-the-art, pure and lazy functional
|
|
programming language designed for making real-world applications. Some
|
|
of its most notable language features are uniqueness typing, dynamic typing,
|
|
and generic functions.
|
|
'';
|
|
|
|
homepage = "http://wiki.clean.cs.ru.nl/Clean";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = [ lib.maintainers.erin ];
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
};
|
|
}
|