Skip to content

Instantly share code, notes, and snippets.

@agoose77
Created June 3, 2026 10:48
Show Gist options
  • Select an option

  • Save agoose77/7fdeda83967a3f0793304faad1d82446 to your computer and use it in GitHub Desktop.

Select an option

Save agoose77/7fdeda83967a3f0793304faad1d82446 to your computer and use it in GitHub Desktop.
Docker image in Flake
{
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