nix: update to upstream nixpkgs
parent
4b84038ee4
commit
3db90c3904
|
@ -1,14 +1,16 @@
|
|||
with import <nixpkgs> {};
|
||||
let
|
||||
gputils = callPackage ./gputils.nix {};
|
||||
sdcc = pkgs.callPackage ./sdcc.nix {
|
||||
inherit gputils;
|
||||
disabled = lib.splitString " " "mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic16 hc08 s08 stm8";
|
||||
};
|
||||
pkgs = import <nixpkgs> {};
|
||||
sdcc_ = (pkgs.sdcc.override {
|
||||
inherit (pkgs) gputils;
|
||||
excludePorts = ["mcs51" "z80" "z180" "r2k" "r3ka" "gbz80" "tlcs90" "ds390" "ds400" "pic16" "hc08" "s08" "stm8"];
|
||||
}).overrideAttrs (o: {
|
||||
enableParallelBuilding = true;
|
||||
});
|
||||
in
|
||||
with pkgs;
|
||||
stdenv.mkDerivation {
|
||||
name = "blink";
|
||||
buildInputs = [ sdcc gputils ];
|
||||
buildInputs = [ sdcc_ gputils ];
|
||||
src = ./.;
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.5.0-1";
|
||||
name = "gputils-${version}";
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gputils/${name}.tar.bz2";
|
||||
sha256 = "055v83fdgqljprapf7rmh8x66mr13fj0qypj49xba5spx0ca123g";
|
||||
};
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://sdcc.sourceforge.net/;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.yorickvp ];
|
||||
};
|
||||
}
|
37
src/sdcc.nix
37
src/sdcc.nix
|
@ -1,37 +0,0 @@
|
|||
{ stdenv, fetchurl, bison, flex, boost, texinfo, autoconf, zlib, gputils ? null, disabled ? [] }:
|
||||
let
|
||||
allDisabled = (if gputils == null then [ "pic14" "pic16" ] else []) ++ disabled;
|
||||
# choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
|
||||
inherit (stdenv) lib;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.8.0";
|
||||
name = "sdcc-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
|
||||
sha256 = "08dvvdxd99hb50wvs8m986v3scfj1rdjw18js7pk5n3vxf6nccdk";
|
||||
};
|
||||
|
||||
buildInputs = [ bison flex boost texinfo gputils autoconf zlib ];
|
||||
|
||||
configureFlags = ''
|
||||
${lib.concatMapStringsSep " " (f: "--disable-${f}-port") allDisabled}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Small Device C Compiler";
|
||||
longDescription = ''
|
||||
SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
|
||||
the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
|
||||
(formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based
|
||||
(hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000,
|
||||
Rabbit 3000A). Work is in progress on supporting the Microchip PIC16 and
|
||||
PIC18 targets. It can be retargeted for other microprocessors.
|
||||
'';
|
||||
homepage = http://sdcc.sourceforge.net/;
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bjornfor maintainers.yorickvp ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue