Revert some GMP stuff

This commit is contained in:
Smaug123
2021-10-27 20:28:12 +01:00
parent bcf7acd881
commit 752789e973
5 changed files with 25 additions and 14 deletions

View File

@@ -1,8 +0,0 @@
{
packageOverrides = pkgs: {
gmp = pkgs.gmp.override { postInstall = ''
ln -s /usr/local/opt/gmp/lib/libgmp.10.dylib $out/lib/libgmp.10.dylib
'';
};
};
}

View File

@@ -1,9 +1,13 @@
{ config, lib, ... }:
let pkgs = import <nixpkgs> { config = import ./config.nix; }; in
{ config, lib, pkgs, ... }:
let python = import ./python.nix { inherit pkgs; }; in
let gmp =
#if pkgs.stdenv.isDarwin then
import ./gmp.nix { inherit pkgs; }
#else pkgs.gmp
; in
{
nix.useDaemon = true;
@@ -22,8 +26,7 @@ let python = import ./python.nix { inherit pkgs; }; in
pkgs.rustc
pkgs.cargo
pkgs.clang
pkgs.gmp
pkgs.darwin.apple_sdk.frameworks.Foundation
gmp
python
#pkgs.keepassxc
];

14
gmp.nix Normal file
View File

@@ -0,0 +1,14 @@
{ pkgs ? import <nixpkgs> {} }:
# If this fails, `chmod -R a+rw /usr/local/opt/gmp/lib`
pkgs.stdenv.mkDerivation {
name = "gmp-symlink";
builder = "${pkgs.bash}/bin/bash";
args = ["-c" "${pkgs.coreutils}/bin/mkdir -p $out && ${pkgs.coreutils}/bin/touch $out/gmp-symlink"];
system = "x86_64-darwin";
postInstall =
''
${pkgs.coreutils}/bin/echo "hi!"
${pkgs.coreutils}/bin/ln -s ${pkgs.gmp}/lib/libgmp.10.dylib /usr/local/opt/gmp/lib/libgmp.10.dylib
'';
}

View File

@@ -35,6 +35,7 @@
pkgs.handbrake
pkgs.ripgrep
pkgs.elan
pkgs.coreutils-prefixed
];
programs.vscode = {
@@ -111,7 +112,7 @@ let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0''; }
YouCompleteMe
tagbar
];

1
result Symbolic link
View File

@@ -0,0 +1 @@
/nix/store/gfc3ba816plnkzix49frmjg0729h58rn-gmp-symlink