From 53d8d7af7d2159c690ace1c8d5296287505bc4c8 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 24 Aug 2020 23:02:08 +0200 Subject: [PATCH] Use nix --- .drone.yml | 3 +-- .envrc | 1 + Pipfile | 13 ------------- Pipfile.lock | 29 ----------------------------- build.sh | 2 +- shell.nix | 13 +++++++++++++ 6 files changed, 16 insertions(+), 45 deletions(-) create mode 100644 .envrc delete mode 100644 Pipfile delete mode 100644 Pipfile.lock create mode 100644 shell.nix diff --git a/.drone.yml b/.drone.yml index f02895c..e1c2dbd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,8 +19,7 @@ steps: - set -e - echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories - apk add --no-cache git git-lfs jq py3-pip py3-virtualenv unzip wget zola - - pip3 install --no-cache-dir pipenv - - pipenv install + - pip3 install --no-cache-dir mutagen - wget -qO - https://raw.githubusercontent.com/MestreLion/git-tools/master/git-restore-mtime | python3 - - ./vendor.sh - ./build.sh diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/Pipfile b/Pipfile deleted file mode 100644 index d78e65a..0000000 --- a/Pipfile +++ /dev/null @@ -1,13 +0,0 @@ -# vim: set ft=toml: -[[source]] -name = "pypi" -url = "https://pypi.org/simple" -verify_ssl = true - -[dev-packages] - -[packages] -mutagen = "*" - -[requires] -python_version = "3.8" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 74f9971..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "127455b11ccc0f3968d05e2c6ef0b3532f68d20ac459d08f1aa4550c22ebb866" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3.8" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "mutagen": { - "hashes": [ - "sha256:6397602efb3c2d7baebd2166ed85731ae1c1d475abca22090b7141ff5034b3e1", - "sha256:9c9f243fcec7f410f138cb12c21c84c64fde4195481a30c9bfb05b5f003adfed" - ], - "index": "pypi", - "version": "==1.45.1" - } - }, - "develop": {} -} diff --git a/build.sh b/build.sh index abd6216..da15ca1 100755 --- a/build.sh +++ b/build.sh @@ -3,6 +3,6 @@ set -e ./metadata.py zola build echo "Encoding…" -pipenv run ./encode.py +./encode.py ./metadata.py zola build diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..6dd2b5b --- /dev/null +++ b/shell.nix @@ -0,0 +1,13 @@ +{ pkgs ? import {} +, unstable ? import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) {} +}: + +pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + python38 + python38Packages.mutagen + unstable.zola + unzip + wget + ]; +}