Skip to content

Instantly share code, notes, and snippets.

#define HAVE_BOEHMGC 1
#include "miniz.h"
#include <nix/eval.hh>
#include <nix/eval-inline.hh>
#include <iostream>
using namespace nix;
class ZipFileValue : public ExternalValueBase
{
mz_zip_archive zipfile;
#!/usr/bin/env bash
# usage: ./nix-copy-quick.sh /nix/store/asdf.drv build-server.com
TMPDIR=$(mktemp -d)
echo $TMPDIR
function finish {
rm -rf $TMPDIR
}
trap finish EXIT
set -x
nix copy --to file://$TMPDIR $1
$ nix build -f https://github.com/input-output-hk/nix-tools/archive/master.tar.gz
trace: gitSource.nix: /nix/store/6iymd0909n1lggkany7y13cg2hsxaz2n-master.tar.gz does not seem to be a git repository,
assuming it is a clean checkout.
trace: Using index-state: 2020-01-10T00:00:00Z
builder for '/nix/store/glvsk7b5zkalmsd8lmka5jc3xp453zhc-hnix-617d086.drv' failed with exit code 1; last 10 log lines:
* [new tag] 1.5.1 -> 1.5.1
* [new tag] 1.5.2 -> 1.5.2
* [new tag] 1.5.3 -> 1.5.3
* [new tag] 1.6 -> 1.6
* [new tag] 1.6.1 -> 1.6.1
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index e1171082..c3d3002f 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -3592,8 +3592,15 @@ void DerivationGoal::registerOutputs()
if (buildMode == bmRepair)
replaceValidPath(path, actualPath);
else
- if (buildMode != bmCheck && rename(actualPath.c_str(), worker.store.toRealPath(path).c_str()) == -1)
- throw SysError(format("moving build output '%1%' from the sandbox to the Nix store") % path);
@yorickvP
yorickvP / cache.nix
Last active December 7, 2019 13:22
# usage: cache = import ./cache.nix { pkgs, stackYaml = ./stack.yaml; }
let sources = import ../nix/sources.nix;
in { pkgs ? import sources.nixpkgs { }, stackYaml ? ./stack.yaml }:
let
s2n = import "${sources.stack-to-nix}/lib.nix" pkgs;
deps = (s2n.importYAML stackYaml).extra-deps or [ ];
hashPath = path: pkgs.runCommand "hash-path" {
preferLocalBuild = true;
} ''
echo -n \'\'$(${pkgs.nix}/bin/nix-hash --type sha256 --base32 ${path})\'\' > $out
73658 Vulnerability roundup 77: libpcap-1.9.0: 6 advisories
73656 Vulnerability roundup 77: jquery-1.11.3.min.js: 2 advisories
73655 Vulnerability roundup 77: jquery-1.11.3: 1 advisory
73652 Vulnerability roundup 77: imagemagick-6.9.10-69: 48 advisories
73650 Vulnerability roundup 77: http-client-0.6.4: 1 advisory
73633 Vulnerability roundup 77: gcc-7.4.0: 2 advisories
73632 Vulnerability roundup 77: gcc-6.5.0: 2 advisories
73623 Vulnerability roundup 77: dbus-1: 1 advisory
73621 Vulnerability roundup 77: cookie-0.4.4: 1 advisory
70117 Vulnerability roundup 76: opencv-3.4.7: 1 advisory
{
stackProjectCross = {crossPkgs, pkgs, ...}@args: with crossPkgs.haskell-nix;
let stack = importAndFilterProject (pkgs.haskell-nix.callStackToNix args);
pkg-set = mkStackPkgSet
{ stack-pkgs = stack.pkgs;
pkg-def-extras = (args.pkg-def-extras or []);
modules = (args.modules or [])
++ pkgs.lib.optional (args ? ghc) { ghc.package = args.ghc; }
++ pkgs.lib.optional (args ? cache) (mkCacheModule args.cache);
};
{ pkgs ? import <nixpkgs> { } }:
let
oca = pkgs.ocaml-ng.ocamlPackages_4_07.overrideScope' (self: super: {
# tezosPackage = self.callPackage ({ buildDunePackage, fetchgit }: (args:
# buildDunePackage ({
# version = "0.0.1";
# minimumOCamlVersion = "4.07";
# #src = ./.;
let
haskell-nix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz);
pkgs-native = import <nixpkgs> haskell-nix;
pkgs-musl = import <nixpkgs> (haskell-nix // { crossSystem = pkgs-native.lib.systems.examples.musl64; });
stackProjectCross = {crossPkgs, pkgs, ...}@args: with crossPkgs.haskell-nix;
let stack = importAndFilterProject (pkgs.haskell-nix.callStackToNix args);
pkg-set = mkStackPkgSet
{ stack-pkgs = stack.pkgs;
pkg-def-extras = (args.pkg-def-extras or []);
modules = (args.modules or [])