Compare commits

...

8 Commits

8 changed files with 74 additions and 3 deletions

23
flake-template.nix Normal file
View File

@@ -0,0 +1,23 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
outputs =
{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
in
{
devShells."${system}".default =
let
pkgs = import nixpkgs {
inherit system;
};
in
pkgs.mkShell {
packages = with pkgs; [
];
shellHook = "";
};
};
}

View File

@@ -3,7 +3,7 @@
with pkgs;
mkShell {
buildInputs = [ dart flutter androidenv.androidPkgs_9_0.androidsdk jdk ];
buildInputs = [ flutter hover androidenv.androidPkgs_9_0.androidsdk jdk ];
ANDROID_HOME = "${androidenv.androidPkgs_9_0.androidsdk}/libexec/android-sdk";
ANDROID_AVD_HOME = (toString ./.) + "/.android/avd";

View File

@@ -21,7 +21,9 @@ in mkShell {
mysqld --datadir="${data_dir}" --socket="${socket}" --skip-networking --skip-mysqlx &
sleep 1
mysql --socket="${socket}" -u root < ${sql_file}
if [ ! -d ${data_dir} ]; then
mysql --socket="${socket}" -u root < ${sql_file}
fi
alias mysql='mysql --socket="${socket}" -u root'
alias nuke='rm -rf ${data_dir}'

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

@@ -22,7 +22,10 @@ in mkShell {
pg_ctl start -o "--unix_socket_directories=${data_dir} --listen_addresses='''"
fi
psql -d postgres -f ${sql_file}
if [ ! -d ${data_dir} ]; then
psql -d postgres -f ${sql_file}
fi
alias psql='psql -d postgres'
alias nuke='rm -rf ${data_dir}'
'';

15
python-data-science.nix Normal file
View File

@@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
with pkgs;
{
buildInputs = [
python3
python3Packages.jupyter
python3Packages.numpy
python3Packages.pandas
python3Packages.scikit-learn
python3Packages.matplotlib
python3Packages.seaborn
];
}

9
shell.nix Normal file
View File

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

11
tensorflow-poetry.nix Normal file
View File

@@ -0,0 +1,11 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell {
buildInputs = [ python38 poetry ];
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH
unset SOURCE_DATE_EPOCH
'';
}