Skip to content

Instantly share code, notes, and snippets.

View danieldk's full-sized avatar

Daniël de Kok danieldk

View GitHub Profile
import torch
from torch import nn
class TensorModule(nn.Module):
def __init__(self, tensors):
super(TensorModule, self).__init__()
for tensor_name, tensor in tensors.items():
setattr(self, tensor_name, nn.Parameter(tensor))
{ stdenv
, fetchFromGitLab
, autoreconfHook
, pkg-config
, intltool
, itstool
, mono
, yelp-tools
, wrapGAppsHook
, enchant1
diff --git a/pkgs/development/libraries/utf8cpp/default.nix b/pkgs/development/libraries/utf8cpp/default.nix
index f42baa2576a..a2aac1241cd 100644
--- a/pkgs/development/libraries/utf8cpp/default.nix
+++ b/pkgs/development/libraries/utf8cpp/default.nix
@@ -8,17 +8,20 @@ stdenv.mkDerivation rec {
owner = "nemtrif";
repo = "utfcpp";
rev = "v${version}";
- sha256 = "1d5p9l27mxhsmm4zlxjsbxngsmr5yxrzi66x550bf5g92sj52ffc";
+ fetchSubmodules = true;
import math
import random
FAC3 = 6.
FAC5 = 120.
FAC7 = 5040.
def poorMenSine(x):
return x - (x ** 3 / FAC3) + (x ** 5 / FAC5) - (x ** 7 / FAC7)
--- /nix/store/nbkx2qghlh05dscldwxbrbbjm0jl2xws-bert-base-german-cased-vocab.txt 1970-01-01 01:00:01.000000000 +0100
+++ bert-base-german-cased-vocab.txt 2020-04-16 11:38:36.000000000 +0200
@@ -121,7 +121,7 @@
ver
##ls
Z
-(
+[unused_punctuation4]
##ir
Die
--- wc.c 2019-11-21 06:57:27.995567360 +0100
+++ wc3.c 2019-11-21 08:05:08.386223937 +0100
@@ -137,11 +137,10 @@
struct stat sb;
uintmax_t linect, wordct, charct;
int fd, len, warned;
- size_t clen;
short gotsp;
u_char *p;
u_char buf[MAXBSIZE];
diff --git a/crate2nix.nix b/crate2nix.nix
index bca75df..9e0d364 100644
--- a/crate2nix.nix
+++ b/crate2nix.nix
@@ -178,6 +178,7 @@ rec {
dependencies = {
"getrandom" = {
packageId = "getrandom 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)";
+ rename = "getrandom_package";
optional = true;
diff --git a/pkgs/build-support/rust/build-rust-crate/build-crate.nix b/pkgs/build-support/rust/build-rust-crate/build-crate.nix
index 2999c3d4c1d..d3f9ded4a04 100644
--- a/pkgs/build-support/rust/build-rust-crate/build-crate.nix
+++ b/pkgs/build-support/rust/build-rust-crate/build-crate.nix
@@ -3,11 +3,11 @@
dependencies,
crateFeatures, libName, release, libPath,
crateType, metadata, crateBin, hasCrateBin,
- extraRustcOpts, verbose, colors }:
+ extraRustcOpts, verbose, colors, renames }:
diff --git a/crate2nix.nix b/crate2nix.nix
index bca75df..8adad74 100644
--- a/crate2nix.nix
+++ b/crate2nix.nix
@@ -123,6 +123,34 @@ rec {
};
resolvedDefaultFeatures = [ "std" ];
};
+ "getrandom 0.1.11 (registry+https://github.com/rust-lang/crates.io-index) renamed to getrandom_package"
+ = rec {
diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix
index 1eee203373a..6ead97e80f8 100644
--- a/pkgs/applications/misc/kitty/default.nix
+++ b/pkgs/applications/misc/kitty/default.nix
@@ -1,6 +1,6 @@
{ stdenv, substituteAll, fetchFromGitHub, python3Packages, glfw, libunistring,
harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
- libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
+ libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor,
libxkbcommon, libXi, libXext, wayland-protocols, wayland,