Compare commits

...

2 Commits

Author SHA1 Message Date
coolneng 1a0194144f
Add standard nix files and nix-ld 2022-10-20 10:36:34 +02:00
coolneng 09a07624c7
Run jupyter automatically in python datasci 2022-10-20 10:36:34 +02:00
4 changed files with 39 additions and 2 deletions

14
flake-template.nix Normal file
View File

@ -0,0 +1,14 @@
{
description = "";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
{
devShell = import ./shell.nix { inherit pkgs; };
}
);
}

8
nix-ld.nix Normal file
View File

@ -0,0 +1,8 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [ stdenv.cc.cc openssl ];
NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker";
}

View File

@ -1,8 +1,8 @@
{ config, lib, pkgs, ... }:
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
{
mkShell {
buildInputs = [
python3
python3Packages.jupyter
@ -12,4 +12,10 @@ with pkgs;
python3Packages.matplotlib
python3Packages.seaborn
];
shellHook = ''
trap "kill 0" EXIT
jupyter notebook
'';
}

9
shell.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = [
];
}