Created
June 3, 2026 10:48
-
-
Save agoose77/7fdeda83967a3f0793304faad1d82446 to your computer and use it in GitHub Desktop.
Docker image in Flake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "nbgitpuller"; | |
| inputs = { | |
| nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; | |
| }; | |
| outputs = { | |
| self, | |
| nixpkgs, | |
| }: let | |
| pkgs = nixpkgs.legacyPackages.x86_64-linux; | |
| inherit (pkgs) lib; | |
| py3 = pkgs.python313; | |
| puller = py3.pkgs.buildPythonApplication rec { | |
| pname = "nbgitpuller"; | |
| version = "1.3.0"; | |
| format = "wheel"; | |
| src = pkgs.fetchPypi { | |
| inherit pname version; | |
| format = "wheel"; | |
| hash = "sha256-oK5kq3a6nZdQILz8nx8eq9czotmqtjvz+09P4TlO4/c="; | |
| }; | |
| dependencies = with py3.pkgs; [ | |
| jupyter-server | |
| tornado | |
| ]; | |
| }; | |
| dockerImage = pkgs.dockerTools.buildImage { | |
| name = "nbgitpuller-init"; | |
| tag = "latest"; | |
| created = "now"; | |
| contents = [pkgs.git]; | |
| config = { | |
| Cmd = ["${lib.getExe' puller "gitpuller"}"]; | |
| ExposedPorts = { | |
| }; | |
| }; | |
| }; | |
| in { | |
| packages.x86_64-linux.default = dockerImage; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment