diff --git a/base/platforms/t14/default.nix b/base/platforms/t14/default.nix index 2e17337..f34b541 100644 --- a/base/platforms/t14/default.nix +++ b/base/platforms/t14/default.nix @@ -25,24 +25,34 @@ hardware.opengl.enable = true; - # esto es de la FGPA, eliminar cuando termine el curso - services.udev.extraRules = '' - # USB-Blaster - ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="660", GROUP="dialout", TAG+="uaccess" - ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="660", GROUP="dialout", TAG+="uaccess" - ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="660", GROUP="dialout", TAG+="uaccess" + hardware.pulseaudio = { + enable = true; + package = pkgs.pulseaudioFull; + }; - # USB-Blaster II - ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="660", GROUP="dialout", TAG+="uaccess" - ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="660", GROUP="dialout", TAG+="uaccess" - ''; + hardware.bluetooth.enable = true; + hardware.bluetooth.settings = { + General = { + Enable = "Source,Sink,Media,Socket"; + }; +}; services = { fwupd.enable = true; thinkfan.enable = true; tlp.enable = true; - tp-auto-kbbl.enable =true; + tp-auto-kbbl.enable = true; + blueman.enable = true; }; + services = { + pcscd.enable = true; + udev.packages = [ pkgs.yubikey-personalization ]; + }; + + environment.etc."pkcs11/modules/ykcs11".text = '' + module: ${pkgs.yubico-piv-tool}/lib/libykcs11.so + ''; + } diff --git a/flake.lock b/flake.lock index 91e9f96..6ce12e8 100644 --- a/flake.lock +++ b/flake.lock @@ -34,20 +34,19 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ], - "utils": "utils" + ] }, "locked": { - "lastModified": 1679067101, - "narHash": "sha256-tMI1inGT9u4KWQml0w30dhWqQPlth1e9K/68sfDkEQA=", + "lastModified": 1712386041, + "narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "9154cd519a8942728038819682d6b3ff33f321bb", + "rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-22.11", + "ref": "release-23.11", "repo": "home-manager", "type": "github" } @@ -88,16 +87,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1679318992, - "narHash": "sha256-uoj5Oy6hruIHuxzfQZtcalObe5kPrX9v+ClUMFEOzmE=", + "lastModified": 1712310679, + "narHash": "sha256-XgC/a/giEeNkhme/AV1ToipoZ/IVm1MV2ntiK4Tm+pw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e2c97799da5f5cd87adfa5017fba971771e123ef", + "rev": "72da83d9515b43550436891f538ff41d68eecc7f", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-22.11", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } @@ -142,21 +141,6 @@ "repo": "nixpkgs", "type": "github" } - }, - "utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index fa62f9d..9a1cda6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,13 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; # actualizar esto para actualizar + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; # actualizar esto para actualizar unstable.url = "github:nixos/nixpkgs/master"; nur.url = "github:nix-community/NUR"; hm-isolation.url = "github:3442/hm-isolation"; nixGL.url = "github:guibou/nixGL"; home-manager = { - url = "github:nix-community/home-manager/release-22.11"; # actualizar esto para actualizar + url = "github:nix-community/home-manager/release-23.11"; # actualizar esto para actualizar inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/home/allowUnfreeWhitelist.nix b/home/allowUnfreeWhitelist.nix index 2988e39..3cf7571 100644 --- a/home/allowUnfreeWhitelist.nix +++ b/home/allowUnfreeWhitelist.nix @@ -11,8 +11,6 @@ with lib; "steam" "steam-original" "steam-run" - "teams" - "unrar" "vscode-extension-ms-vscode-cpptools" "vmware-horizon-client" "zoom" diff --git a/home/apps/messaging.nix b/home/apps/messaging.nix index b1f2178..caaa489 100644 --- a/home/apps/messaging.nix +++ b/home/apps/messaging.nix @@ -7,12 +7,7 @@ in options.local.apps.messaging.enable = mkEnableOption "Messaging apps"; config = mkIf cfg.enable { home.packages = with pkgs; [ - discord - signal-desktop - tdesktop - teams thunderbird - zoom-us ]; }; } diff --git a/home/apps/multimedia.nix b/home/apps/multimedia.nix index df0d3fe..7219167 100644 --- a/home/apps/multimedia.nix +++ b/home/apps/multimedia.nix @@ -8,6 +8,9 @@ in config = mkIf cfg.enable { home.packages = with pkgs; [ deluge + lapce + ledfx + jack2 mpv obs-studio pavucontrol diff --git a/home/cli.nix b/home/cli.nix index 129ba50..67d452d 100644 --- a/home/cli.nix +++ b/home/cli.nix @@ -4,7 +4,7 @@ with lib; programs = { zsh = { enable = true; - enableSyntaxHighlighting = true; + syntaxHighlighting.enable = true; initExtra = import ./zshrc.nix pkgs; }; git = { @@ -12,6 +12,61 @@ with lib; userEmail = "fabian@cluster451.org"; userName = "Fabián Montero"; signing.key = "E77A808BF9A955D668EEEA6473FA9C9CB5F0249B"; + extraConfig.init.defaultBranch = "main"; + }; + helix = { + enable = true; + settings = { + # theme = "onedark"; + editor = { + mouse = true; + line-number = "absolute"; + cursorline = true; + cursorcolumn = true; + gutters = [ "diagnostics" "spacer" "line-numbers" "diff" ]; + auto-completion = true; + auto-format = true; + auto-save = true; + bufferline = "multiple"; + rulers = [ 80 ]; + true-color = true; + lsp.display-messages = true; + auto-pairs = false; + whitespace = { + render = { + space = "all"; + nbsp = "all"; + tab = "all"; + newline = "none"; + }; + + }; + indent-guides = { + character = "╎"; + render = true; + }; + cursor-shape = { + select = "block"; + insert = "block"; + normal = "block"; + }; + statusline = { + left = [ "mode" "spinner" "version-control" "file-name" "file-modification-indicator" "total-line-numbers" ]; + }; + file-picker = { + hidden = false; + follow-symlinks = false; + deduplicate-links = false; + + }; + }; + keys.normal = { + space.space = "file_picker"; + space.w = ":w"; + space.q = ":q"; + esc = [ "collapse_selection" "keep_primary_selection" ]; + }; + }; }; }; @@ -27,7 +82,6 @@ with lib; rar tree units - unrar unzip usbutils zip diff --git a/home/default.nix b/home/default.nix index 7459784..fe4fe6c 100644 --- a/home/default.nix +++ b/home/default.nix @@ -39,6 +39,12 @@ with lib; "unstable".flake = unstable; }; + services.gpg-agent = { + enable = true; + enableZshIntegration = true; + pinentryFlavor = "gtk2"; + }; + programs.home-manager.enable = true; xdg = { diff --git a/home/gui/default.nix b/home/gui/default.nix index 3585b1b..c308578 100644 --- a/home/gui/default.nix +++ b/home/gui/default.nix @@ -41,6 +41,7 @@ in betterlockscreen = { enable = true; + inactiveInterval = 60; }; }; diff --git a/home/gui/i3.nix b/home/gui/i3.nix index 7f21107..d165447 100644 --- a/home/gui/i3.nix +++ b/home/gui/i3.nix @@ -69,9 +69,6 @@ in { command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 1; exec ${pkgs.firefox}/bin/firefox'"; } - { - command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.tdesktop}/bin/telegram-desktop'"; - } { command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.signal-desktop}/bin/signal-desktop'"; } diff --git a/home/platforms/t14.nix b/home/platforms/t14.nix index 791e674..f075ada 100644 --- a/home/platforms/t14.nix +++ b/home/platforms/t14.nix @@ -2,6 +2,10 @@ config.local = { nixos = true; + apps = { + steam.enable = true; + }; + display = { "0" = "eDP-1"; "1" = null; diff --git a/home/shenvs/altera.nix b/home/shenvs/altera.nix deleted file mode 100644 index d780db3..0000000 --- a/home/shenvs/altera.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ lib, pkgs, ... }: -with lib; { - static = false; # !!!! - namespaced = true; - - packages = with pkgs; [ - (quartus-prime-lite.override { supportedDevices = [ "Cyclone V" ]; }) - binutils - gcc - gnumake - gtkwave - verilator - ]; - - hm = { - # QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries. - home.sessionVariables.LD_LIBRARY_PATH = "${pkgs.gtk2}/lib"; - - # Evita GC - xdg.configFile."quartus-inputs".text = let - inherit (pkgs) requireFile; - homepage = "https://fpgasoftware.intel.com"; - version = "20.1.1.720"; - url = "${homepage}/${versions.majorMinor version}/?edition=lite&platform=linux"; - - inputs = [ - (requireFile { - name = "QuartusLiteSetup-${version}-linux.run"; - sha256 = "0mjp1rg312dipr7q95pb4nf4b8fwvxgflnd1vafi3g9cshbb1c3k"; - inherit url; - }) - - (requireFile { - name = "ModelSimSetup-${version}-linux.run"; - sha256 = "1cqgv8x6vqga8s4v19yhmgrr886rb6p7sbx80528df5n4rpr2k4i"; - inherit url; - }) - - (requireFile { - name = "cyclonev-${version}.qdz"; - sha256 = "11baa9zpmmfkmyv33w1r57ipf490gnd3dpi2daripf38wld8lgak"; - inherit url; - }) - ]; - in concatStringsSep "\n" inputs; - - - # dice soto que ponga esto globalmente si quiero nightmode en todo - # Usar gtk en aplicaciones de jvm - home.sessionVariables._JAVA_OPTIONS = concatStringsSep " " [ - "-Dawt.useSystemAAFontSettings=on" - "-Dswing.aatext=true" - "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" - "-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" - ]; - - gtk = { - enable = true; - - gtk2.extraConfig = '' - gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ - gtk-menu-images=1 - gtk-button-images=1 - ''; - - font = { - package = pkgs.noto-fonts; - name = "Noto Sans Regular"; - #size = 14; <- caga layout de páginas - }; - - theme = { - package = pkgs.materia-theme; - name = "Materia-dark"; - }; - }; - - qt = { - enable = true; - platformTheme = "gtk"; - }; - }; -} diff --git a/home/shenvs/c.nix b/home/shenvs/c.nix index e426d59..02df9e8 100644 --- a/home/shenvs/c.nix +++ b/home/shenvs/c.nix @@ -5,12 +5,12 @@ packages = with pkgs; [ binutils cmake - gdb - gcc-arm-embedded + #gdb + #gcc-arm-embedded gnumake - lldb - openocd - qemu - valgrind + #lldb + #openocd + #qemu + #valgrind ]; } diff --git a/home/shenvs/octave.nix b/home/shenvs/octave.nix deleted file mode 100644 index 75d135a..0000000 --- a/home/shenvs/octave.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs, ...}: -{ - static = true; - - packages = with pkgs; [ - (octave.withPackages (packages: with packages; [ - symbolic - signal - ])) - (python39.withPackages (packages: with packages; [ - numpy - pipenv - scipy - sympy - matplotlib - ])) - ]; -} diff --git a/home/shenvs/python.nix b/home/shenvs/python.nix index 83a5f81..53d0325 100644 --- a/home/shenvs/python.nix +++ b/home/shenvs/python.nix @@ -5,12 +5,7 @@ packages = with pkgs; [ pipenv (python310.withPackages ( packages: with packages; [ - matplotlib - numpy - pandas requests - scipy - setuptools ])) ]; } diff --git a/home/shenvs/tex.nix b/home/shenvs/tex.nix deleted file mode 100644 index ba89df8..0000000 --- a/home/shenvs/tex.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs, ... }: -{ - static = true; - - packages = with pkgs; [ - biber - (texlive.combine { - inherit (texlive) - appendix - scheme-medium - biblatex - biblatex-ieee - cleveref - csquotes - enumitem - ieeetran - titlesec - titling - zref; - }) - ]; -} \ No newline at end of file diff --git a/home/systemd/default.nix b/home/systemd/default.nix index bd3dda7..767e9cb 100644 --- a/home/systemd/default.nix +++ b/home/systemd/default.nix @@ -4,4 +4,11 @@ with lib; systemd.user.tmpfiles.rules = [ "d %t/tmp 0700 fabian fabian 24h" ]; + + systemd.user.services.mpris-proxy = { + Unit.Description = "Mpris proxy"; + Unit.After = [ "network.target" "sound.target" ]; + Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; + Install.WantedBy = [ "default.target" ]; + }; } diff --git a/pkgs/default.nix b/pkgs/default.nix index f323efe..f05a20f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,5 +1,4 @@ pkgs: { - #andesight = pkgs.callPackage ./andesight {}; - #netextender = pkgs.callPackage ./netextender {}; + simplescalar = pkgs.callPackage ./simple-scalar {}; } diff --git a/pkgs/simple-scalar/0001-fix-case-of-YY_CURRENT_BUFFER.patch b/pkgs/simple-scalar/0001-fix-case-of-YY_CURRENT_BUFFER.patch new file mode 100644 index 0000000..5d7cf85 --- /dev/null +++ b/pkgs/simple-scalar/0001-fix-case-of-YY_CURRENT_BUFFER.patch @@ -0,0 +1,25 @@ +From 33f6fb023c09464467eea4538f18e2a131acee3a Mon Sep 17 00:00:00 2001 +From: Alejandro Soto +Date: Wed, 26 Apr 2023 13:37:32 -0600 +Subject: [PATCH] fix case of YY_CURRENT_BUFFER + +--- + ld/ldlex.l | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/simpleutils-990811/ld/ldlex.l b/simpleutils-990811/ld/ldlex.l +index 2eef80f..561b8af 100644 +--- a/simpleutils-990811/ld/ldlex.l ++++ b/simpleutils-990811/ld/ldlex.l +@@ -585,7 +585,7 @@ yy_input (buf, result, max_size) + int max_size; + { + *result = 0; +- if (yy_current_buffer->yy_input_file) ++ if (YY_CURRENT_BUFFER->yy_input_file) + { + if (yyin) + { +-- +2.38.4 + diff --git a/pkgs/simple-scalar/0002-define-sys_nerr.patch b/pkgs/simple-scalar/0002-define-sys_nerr.patch new file mode 100644 index 0000000..021d157 --- /dev/null +++ b/pkgs/simple-scalar/0002-define-sys_nerr.patch @@ -0,0 +1,24 @@ +From 442edcc1d281a62a0092bcde19038ba3c976e499 Mon Sep 17 00:00:00 2001 +From: Alejandro Soto +Date: Wed, 26 Apr 2023 13:35:21 -0600 +Subject: [PATCH 1/3] define sys_nerr + +--- + gcc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc-2.7.2.3/gcc.c b/gcc-2.7.2.3/gcc.c +index fe7de5b..1ac933f 100644 +--- a/gcc-2.7.2.3/gcc.c ++++ b/gcc-2.7.2.3/gcc.c +@@ -176,6 +176,7 @@ extern int errno; + #endif + + extern int sys_nerr; ++int __attribute__((weak)) sys_nerr = 0; + #ifndef HAVE_STRERROR + #if defined(bsd4_4) + extern const char *const sys_errlist[]; +-- +2.38.4 + diff --git a/pkgs/simple-scalar/0003-fix-obstack.h-post-increment.patch b/pkgs/simple-scalar/0003-fix-obstack.h-post-increment.patch new file mode 100644 index 0000000..8e38a80 --- /dev/null +++ b/pkgs/simple-scalar/0003-fix-obstack.h-post-increment.patch @@ -0,0 +1,25 @@ +From b074acb822459a42d2507ad5729e9e60bb1de572 Mon Sep 17 00:00:00 2001 +From: Alejandro Soto +Date: Wed, 26 Apr 2023 13:35:42 -0600 +Subject: [PATCH 2/3] fix obstack.h post-increment + +--- + obstack.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc-2.7.2.3/obstack.h b/gcc-2.7.2.3/obstack.h +index 28bcd44..3a517b5 100644 +--- a/gcc-2.7.2.3/obstack.h ++++ b/gcc-2.7.2.3/obstack.h +@@ -338,7 +338,7 @@ __extension__ \ + if (__o->next_free + sizeof (void *) > __o->chunk_limit) \ + _obstack_newchunk (__o, sizeof (void *)); \ + if (!__o->alloc_failed) \ +- *((void **)__o->next_free)++ = ((void *)datum); \ ++ *((void **)__o->next_free++) = ((void *)datum); \ + (void) 0; }) + + #define obstack_int_grow(OBSTACK,datum) \ +-- +2.38.4 + diff --git a/pkgs/simple-scalar/0004-stdarg.h-instead-of-varargs.h.patch b/pkgs/simple-scalar/0004-stdarg.h-instead-of-varargs.h.patch new file mode 100644 index 0000000..5e8fc7b --- /dev/null +++ b/pkgs/simple-scalar/0004-stdarg.h-instead-of-varargs.h.patch @@ -0,0 +1,25 @@ +From 12c34c7ff8e4e00ba54bd0b90f2ca6905109cb5d Mon Sep 17 00:00:00 2001 +From: Alejandro Soto +Date: Wed, 26 Apr 2023 13:35:57 -0600 +Subject: [PATCH 3/3] stdarg.h instead of varargs.h + +--- + protoize.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc-2.7.2.3/protoize.c b/gcc-2.7.2.3/protoize.c +index 9728bf2..fb82ef0 100644 +--- a/gcc-2.7.2.3/protoize.c ++++ b/gcc-2.7.2.3/protoize.c +@@ -57,7 +57,7 @@ Boston, MA 02111-1307, USA. */ + #define _POSIX_SOURCE + #endif + +-#include ++#include + /* On some systems stdio.h includes stdarg.h; + we must bring in varargs.h first. */ + #include +-- +2.38.4 + diff --git a/pkgs/simple-scalar/default.nix b/pkgs/simple-scalar/default.nix new file mode 100644 index 0000000..ce64e51 --- /dev/null +++ b/pkgs/simple-scalar/default.nix @@ -0,0 +1,118 @@ +# https://www.cse.iitd.ac.in/~cs5070217/csl718/assignment1/ss_install_instructions.html +{ bison, fetchurl, flex, multiStdenv, stdenv_32bit, strace }: +let + host = "i686-pc-linux"; + target = "sslittle-na-sstrix"; + + gcc-version = "2.7.2.3"; + makeflags = "LANGUAGES=c CC=\"$CC -m32 $CFLAGS\" prefix=$out"; +in +multiStdenv.mkDerivation { + pname = "SimpleScalar"; + version = "1998-08-11"; # !!! + + nativeBuildInputs = [ flex bison ]; + + sourceRoot = "."; + + srcs = [ + (fetchTarball { + name = "simplesim-3.0"; + + url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/simplesim-3v0d.tgz"; + sha256 = "sha256:022rlniimzl30c1874765hl001dxc716vfwm40ij256h1qk2dwgw"; + }) + + (fetchTarball { + name = "simpleutils-990811"; + + url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/simpleutils-990811.tar.gz"; + sha256 = "sha256:0w952z382s7ghrxwrad7fd058b1kj5ad1abh8idxwwk47va72cdf"; + }) + ]; + + # El código es muy viejo y Nix usa opciones muy estrictas por defecto + CFLAGS = "-O3 -Wno-error=format-security"; + + # Algunas tarballs vienen sin directorio de primer nivel y además requieren arreglos + postUnpack = + let + simpletools = fetchurl { + url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/simpletools-2v0.tgz"; + sha256 = "sha256-FTDTqyQWZCnuNPmTcu3Hcjgp4pHNoUcC0GOGhSJV9Iw="; + }; + + gcc-ss = fetchurl { + url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/gcc-${gcc-version}.ss.tar.gz"; + sha256 = "sha256-3R3wsLmxoN3MkEW4gaxnhIyTBs0CUiSiH7C1/hF2atM="; + }; + + ar-and-ranlib = fetchurl { + url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/ar_and_ranlib.tar.gz"; + sha256 = "sha256-MRTO6cAg3WeXlk3jDy2lVuiSXDRz1+LLa2XDkBDygMU="; + }; + in + '' + tar xf ${simpletools} + rm -r gcc-2.6.3 + + tar xf ${gcc-ss} + + mkdir ar-and-ranlib + tar xf ${ar-and-ranlib} -C ar-and-ranlib + + chmod -R +w gcc-${gcc-version} ar-and-ranlib + ''; + + patches = [ + ./0001-fix-case-of-YY_CURRENT_BUFFER.patch + ./0002-define-sys_nerr.patch + ./0003-fix-obstack.h-post-increment.patch + ./0004-stdarg.h-instead-of-varargs.h.patch + ]; + + postPatch = '' + patchelf \ + --set-interpreter "$(<${stdenv_32bit.cc}/nix-support/dynamic-linker-m32)" \ + ar-and-ranlib/{ar,ranlib} + ''; + + configurePhase = '' + BUILD=$PWD + + cd $BUILD/simplesim-3.0 + make config-pisa + + cd $BUILD/simpleutils-990811 + ./configure --host=${host} --target=${target} --with-gnu-as --with-gnu-ld --prefix=$out + + cd $BUILD/gcc-${gcc-version} + ./configure --host=${host} --target=${target} --with-gnu-as --with-gnu-ld --prefix=$out + ''; + + buildPhase = '' + make -C $BUILD/simplesim-3.0 + make -C $BUILD/simpleutils-990811 + + # GCC necesita binutils para compilar + make -C $BUILD/simpleutils-990811 install + cp $BUILD/ar-and-ranlib/{ar,ranlib} $out/${target}/bin/ + + cd $BUILD/gcc-${gcc-version} + + mkdir -p $out/lib + cp patched/sys/cdefs.h $BUILD/${target}/include/sys/cdefs.h + cp -r $BUILD/${target} $out/ + cp $BUILD/${target}/lib/{libc.a,crt0.o} $out/lib/ + sed -i '130s@-I/usr/include@-I./include@' Makefile + + ! make ${makeflags} + sed -i 's/\(return "FIXME\\n\)/\1\\/g' insn-output.c + PATH="$out/${target}/bin:$PATH" make ${makeflags} + ''; + + installPhase = '' + cp $BUILD/simplesim-3.0/{sim-{outorder,cache,profile,bpred,eio,safe,fast},sysprobe} $out/bin/ + PATH="$out/${target}/bin:$PATH" make -C $BUILD/gcc-${gcc-version} ${makeflags} install + ''; +}