Compare commits

...

3 commits

6 changed files with 34 additions and 111 deletions

View file

@ -1,61 +0,0 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708093448,
"narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7763249f02b7786b4ca36e13a4d7365cfba162f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,21 +0,0 @@
{
description = "Logseq";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
( system:
let
pkgs = import nixpkgs {
inherit system;
};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
logseq
];
};
});
}

View file

@ -5,11 +5,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1710146030,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1695360818, "lastModified": 1712608508,
"narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,8 +2,26 @@
description = '' description = ''
Python flake for use with conda environments. Python flake for use with conda environments.
This will create a directory `~/.conda`, which might be rather large, This will create a directory ~/.conda, which might become rather large,
depending on your required packages. depending on your required packages.
### Usage: ###
You can enter the environment in your CLI with:
$ nix-develop -c bash -c "conda-shell -c 'conda activate <environment-name> && sh'"
If you are using Pycharm, you can start up quickly by running:
$ nix develop -c bash -c "conda-shell -c pycharm-professonial && exit"
### Setup: ###
On your first run, enter conda using
$ nix-develop -c bash -c "conda-shell -c 'conda-install'"
(conda-shell)$ conda env create --name <environment-name> --file /path/to/environment.yaml
''; '';
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -16,28 +34,14 @@
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
installation-steps = ''
conda-shell -c 'conda-install'
printf 'Run `conda env create --name ai-practica --file environment.yaml` and exit.\n'
conda-shell && exit
'';
IDE-steps = ''
conda-shell -c pycharm-professional && exit
'';
CLI-steps = ''
printf 'Enter your enviroment by running `conda activate ai-practica`.\n'
conda-shell && exit
'';
in { in {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
conda conda
# You might want to add an IDE of your choice; # You might want to add an IDE of your choice;
jetbrains.pycharm-professional # (jetbrains.plugins.addPlugins jetbrains.pycharm-professional [ "github-copilot" ])
]; ];
shellHook = IDE-steps;
}; };
}); });
} }

View file

@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711124224, "lastModified": 1712588820,
"narHash": "sha256-l0zlN/3CiodvWDtfBOVxeTwYSRz93muVbXWSpaMjXxM=", "narHash": "sha256-y31s5idk3jMJMAVE4Ud9AdI7HT3CgTAeMTJ0StqKN7Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "56528ee42526794d413d6f244648aaee4a7b56c0", "rev": "d272ca50d1f7424fbfcd1e6f1c9e01d92f6da167",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -36,11 +36,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1711163522, "lastModified": 1712608508,
"narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=", "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4", "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -21,6 +21,7 @@
biopython biopython
numpy numpy
dask dask
numba
]; ];
in { in {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
@ -32,7 +33,7 @@
memray memray
# Editor of your choice # Editor of your choice
# jetbrains.pycharm-professional # (jetbrains.plugins.addPlugins jetbrains.pycharm-professional [ "github-copilot" ])
# vscodium # vscodium
]); ]);
}; };