about summary refs log tree commit diff
path: root/users/fcuny/resume
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-25 18:09:38 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-25 18:09:38 -0700
commit22e7b10377a2a5672d5af6840a9a21e298315cfd (patch)
tree5c294d104b75b7d87bdb907a7f295d9959aefa7c /users/fcuny/resume
parentref(blog): drop the flake configuration (diff)
downloadworld-22e7b10377a2a5672d5af6840a9a21e298315cfd.tar.gz
ref(resume): remove flake.nix
Integrate the resume with the rest of the repository, as I did for the
blog in the previous commit.

Added a script to copy the resume in the static directory of the blog.
Diffstat (limited to '')
-rw-r--r--users/fcuny/resume/default.nix32
-rw-r--r--users/fcuny/resume/flake.lock42
-rw-r--r--users/fcuny/resume/flake.nix28
-rw-r--r--users/fcuny/resume/readme.org4
4 files changed, 35 insertions, 71 deletions
diff --git a/users/fcuny/resume/default.nix b/users/fcuny/resume/default.nix
new file mode 100644
index 0000000..86fbcf0
--- /dev/null
+++ b/users/fcuny/resume/default.nix
@@ -0,0 +1,32 @@
+{ pkgs, ... }:
+
+pkgs.stdenv.mkDerivation rec {
+  name = "resume";
+
+  src = ./.;
+
+  nativeBuildInputs = [ pkgs.pandoc pkgs.git ];
+
+  installPhase = ''
+    mkdir -p $out
+    pandoc --self-contained --css styles/resume.css --from org --to html --output $out/resume.html resume.org
+  '';
+
+  publish = pkgs.writers.writeBashBin "publish" ''
+    set -ueo pipefail
+    export PATH=${pkgs.lib.makeBinPath [ pkgs.pandoc pkgs.git ]}
+
+    cd $(git rev-parse --show-toplevel)/users/fcuny/resume
+
+    out=$(git rev-parse --show-toplevel)/users/fcuny/blog/static/resume.html
+    pandoc --self-contained --css styles/resume.css --from org --to html --output $out resume.org
+  '';
+
+  meta = with pkgs.lib; {
+    description = "franck cuny's resume";
+    homepage = "https://fcuny.net/resume.html";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = [ ];
+  };
+}
diff --git a/users/fcuny/resume/flake.lock b/users/fcuny/resume/flake.lock
deleted file mode 100644
index 4e3cc98..0000000
--- a/users/fcuny/resume/flake.lock
+++ /dev/null
@@ -1,42 +0,0 @@
-{
-  "nodes": {
-    "flake-utils": {
-      "locked": {
-        "lastModified": 1649676176,
-        "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
-        "type": "github"
-      },
-      "original": {
-        "owner": "numtide",
-        "repo": "flake-utils",
-        "type": "github"
-      }
-    },
-    "nixpkgs": {
-      "locked": {
-        "lastModified": 1651421973,
-        "narHash": "sha256-8CyOOzFOOqOHs+BblCJpmXJVUr+uifaR2Wu6P1HM0CE=",
-        "owner": "nixos",
-        "repo": "nixpkgs",
-        "rev": "6d21b873f371b2ebff63a16cf9353309d96d8567",
-        "type": "github"
-      },
-      "original": {
-        "owner": "nixos",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
-    "root": {
-      "inputs": {
-        "flake-utils": "flake-utils",
-        "nixpkgs": "nixpkgs"
-      }
-    }
-  },
-  "root": "root",
-  "version": 7
-}
diff --git a/users/fcuny/resume/flake.nix b/users/fcuny/resume/flake.nix
deleted file mode 100644
index 35a7d7d..0000000
--- a/users/fcuny/resume/flake.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-  description = "Franck Cuny's resume";
-  inputs = {
-    nixpkgs.url = "github:nixos/nixpkgs";
-    flake-utils.url = "github:numtide/flake-utils";
-  };
-
-  outputs = { self, nixpkgs, flake-utils }:
-    flake-utils.lib.eachDefaultSystem (system:
-      let pkgs = nixpkgs.legacyPackages.${system};
-      in {
-        defaultPackage = pkgs.stdenv.mkDerivation {
-          name = "resume";
-          version = self.lastModifiedDate;
-          src = ./.;
-          buildInputs = with pkgs; [ pandoc ];
-          buildPhase = ''
-            pandoc --self-contained --css styles/resume.css --from org --to html --output resume.html resume.org
-          '';
-
-          installPhase = ''
-            mkdir -p $out
-            cp resume.html $out/
-          '';
-        };
-        devShell = pkgs.mkShell { buildInputs = with pkgs; [ git pandoc ]; };
-      });
-}
diff --git a/users/fcuny/resume/readme.org b/users/fcuny/resume/readme.org
index 2e668df..169536e 100644
--- a/users/fcuny/resume/readme.org
+++ b/users/fcuny/resume/readme.org
@@ -1,4 +1,6 @@
 #+TITLE: Resume
 
 * Build
-Run =nix build= to generate the resume.
+Run =nix build .#users.fcuny.resume -o users/fcuny/resume/result= to generate the resume.
+* Publish
+Running =nix run .#users.fcuny.resume.publish= will update the file [[file:~/workspace/world/users/fcuny/blog/static/resume.html][resume.html]] in the blog directory. After that you can commit and deploy the blog.